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 :: in a junit test how test if empty list is returned 
Java :: sleep() java 
Java :: java repeat loop cycle for 
Java :: check last character of string java 
Java :: spring data rest partial update 
Java :: character to lower java 
Java :: big integer input in java 
Java :: dagger kapt dependency and plugin 
Java :: cors filter spring boot 
Java :: android java optional arguments 
Java :: hashmap to string array 
Java :: java only close socket outputstream 
Java :: android java toast 
Java :: java string array add element 
Java :: spinner get item text 
Java :: circle line intersection java 
Java :: Lunar New Year 
Java :: iterator constructor java 
Java :: how to add transition between activities android studio 
Java :: making android activity fullscreen android studio 
Java :: find duplicate value in array using java 
Java :: How to convert timestamp to time in android studio 
Java :: what is final in java 
Java :: how to convert int array to integer list in java 
Java :: how to check if a string is empty or null in Android Studio 
Java :: bufferedreader java 
Java :: how to destroy activity in android 
Java :: android retrofit get @query 
Java :: android studio list of strings 
Java :: select word from list 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =