Java Day From getDays(Date sd, Date ed)

Here you can find the source of getDays(Date sd, Date ed)

Description

get Days

License

Open Source License

Declaration

public static int getDays(Date sd, Date ed) 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {

    public static int getDays(Date sd, Date ed) {
        return (int) ((ed.getTime() - sd.getTime()) / (3600 * 24 * 1000));
    }//w  ww . j ava 2  s . co m

    public static long getTime() {
        Date dt = new Date();
        return dt.getTime();
    }
}

Related

  1. getDay(Date date, int day)
  2. getDay(String date)
  3. getDay0(Date date)
  4. getDayOfDate(Date date)
  5. getDays(Date date1, Date date2)
  6. getDaysBetween(int dateInt1, int dateInt2)
  7. getDaysInPastForDate(Date date)
  8. getFirstMilliOfDay(Date date)
  9. getIntervalInDaysSofar(Date from)