Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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();
}
Source by javaf1.com #
 
PREVIOUS NEXT
Tagged: #java #day #week
ADD COMMENT
Topic
Name
7+7 =