Java Day Compare isSameDay(Date date1, Date date2)

Here you can find the source of isSameDay(Date date1, Date date2)

Description

is Same Day

License

Open Source License

Declaration

public static boolean isSameDay(Date date1, Date date2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static boolean isSameDay(Date date1, Date date2) {
        SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd");
        return fmt.format(date1).equals(fmt.format(date2));
    }//from w ww .jav a2 s  .c o  m
}

Related

  1. isSameDay(Date date1, Date date2)
  2. isSameDay(Date date1, Date date2)
  3. isSameDay(Date date1, Date date2)
  4. isSameDay(Date date1, Date date2)
  5. isSameDay(Date date1, Date date2)
  6. isSameDay(Date day1, Date day2)
  7. isSameDay(Date day1, Date day2)
  8. isSameDay(Date preDate, Date postDate)
  9. isSameDay(final Date date1, final Date date2)