Java Date Compare compareDate(Date date1)

Here you can find the source of compareDate(Date date1)

Description

compare Date

License

Apache License

Declaration

public static int compareDate(Date date1) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

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

public class Main {
    public static int compareDate(Date date1) {
        Calendar c = Calendar.getInstance();
        c.clear();/*from ww w  .j a  v  a  2 s .  c o m*/
        Date date2 = c.getTime();
        long quot;
        quot = date1.getTime() - date2.getTime();
        quot = quot / 1000 / 60 / 60 / 24;
        int day = new Long(quot).intValue();
        return day;
    }
}

Related

  1. compareCalendars(Date fechaAComparar, Date fechaBase)
  2. compareDate(Date d1, Date d2)
  3. compareDate(Date d1, Date d2)
  4. compareDate(Date d1, Date d2)
  5. CompareDate(Date date, Date otherdate)
  6. compareDate(Date date1, Date date2)
  7. compareDate(Date date1, Date date2)
  8. compareDate(Date date1, Date date2)
  9. compareDate(Date DATE1, Date DATE2)