Answers for "find no of days from the today in java"

2

java number of days between dates

LocalDate start = LocalDate.parse("2020-11-03");
LocalDate end = LocalDate.parse("2020-12-15");

long diff = DAYS.between(start, end);
Posted by: Guest on February-12-2021
-1

get current day java

Calendar calendar = Calendar.getInstance();
int day = calendar.get(Calendar.DAY_OF_WEEK); 

switch (day) {
    case Calendar.SUNDAY:
        // Current day is Sunday
        break;
    case Calendar.MONDAY:
        // Current day is Monday
        break;
    case Calendar.TUESDAY:
        // etc.
        break;
}
Posted by: Guest on March-29-2020

Code answers related to "find no of days from the today in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language