Java Date Compare by Day isSameDay(Date date)

Here you can find the source of isSameDay(Date date)

Description

is Same Day

License

Open Source License

Declaration

public static boolean isSameDay(Date date) 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static boolean isSameDay(Date date) {
        Calendar calendar = Calendar.getInstance();
        Calendar startCalendar = Calendar.getInstance();
        startCalendar.setTime(date);//w  w w  .j a v a 2s . c  o  m
        return calendar.get(Calendar.DATE) == startCalendar.get(Calendar.DATE);
    }
}

Related

  1. isSameDay(Date a, Date b)
  2. isSameDay(Date a, Date b)
  3. isSameDay(Date d1, Date d2)
  4. isSameDay(Date d1, Date d2)
  5. isSameDay(Date d1, Date d2)
  6. isSameDay(Date date1, Date date2)
  7. isSameDay(Date date1, Date date2)
  8. isSameDay(Date date1, Date date2)
  9. isSameDay(Date day1, Date day2)