Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Get the first Monday of a month in Java

LocalDate now = LocalDate.now();

LocalDate firstMonday = now.with(TemporalAdjusters.firstInMonth(DayOfWeek.MONDAY));
Comment

Get the first day of the current month in Java

LocalDate now = LocalDate.now();

LocalDate firstDay = now.with(TemporalAdjusters.firstDayOfMonth());
Comment

java get first day of the week

private static Date firstDayOfWeek(Date date) {
   Calendar calendar = Calendar.getInstance();
   calendar.setTime(date);
   calendar.set(Calendar.DAY_OF_WEEK, 1);
   return calendar.getTime();
}
Comment

PREVIOUS NEXT
Code Example
Java :: java read first line of file 
Java :: java hello world 
Java :: how to loop through a 2d array java 
Java :: offsetdattime to date 
Java :: getconstructor java 
Java :: capitalize string java 
Java :: print two dimensional array java 
Java :: convert int array to Integer list java 
Java :: java log2 
Java :: how to set spinner value in android 
Java :: get hashmap into array 
Java :: java first day of week 
Java :: import random java 
Java :: turn ascii into text javascriot 
Java :: caesar cipher java 
Java :: how to divide two ints and get a double java 
Java :: android studio remove action bar 
Java :: how to create an array in java 
Java :: java guid 
Java :: len of number in java 
Java :: how to get width android 
Java :: split every character in string into array java 
Java :: java check two dates same day 
Java :: java variables in annotations 
Java :: java return list 
Java :: how to acces every char of a String in java 
Java :: Exception in thread "main" java.util.zip.ZipException: error 
Java :: range in java 
Java :: java download file from url 
Java :: java % 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =