Java Date Before before(Date sDate, Date eDate)

Here you can find the source of before(Date sDate, Date eDate)

Description

before

License

Open Source License

Declaration

public static boolean before(Date sDate, Date eDate) 

Method Source Code

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

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

public class Main {
    public static boolean before(Date sDate, Date eDate) {
        Calendar sCal = new GregorianCalendar();
        sCal.setTime(sDate);//w  w  w .  j a  v  a2s  .  com
        Calendar eCal = new GregorianCalendar();
        eCal.setTime(eDate);
        return sCal.before(eCal);
    }
}

Related

  1. before(Date point, Date when)
  2. beforeDay(final Date date1, final Date date2)
  3. beforeDays(Date date, Integer days)
  4. beforeTime(Date time1, Date time2)
  5. daysBefore(Date date1)