com.jstatcom.util
Class DateDiff

java.lang.Object
  extended by com.jstatcom.util.DateDiff

public class DateDiff
extends java.lang.Object

Helper class for computing the difference of two dates in years, months, weeks or days. The estimates are precise for ranges up to 2000 years. The method takes care of corrections for leap seconds.


Constructor Summary
DateDiff()
           
 
Method Summary
static int getDateDiff(int calUnit, java.util.Date d1, java.util.Date d2)
          int diff = dd.getDateDiff(Calendar.WEEK_OF_YEAR, then, now);
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateDiff

public DateDiff()
Method Detail

getDateDiff

public static int getDateDiff(int calUnit,
                              java.util.Date d1,
                              java.util.Date d2)
int diff = dd.getDateDiff(Calendar.WEEK_OF_YEAR, then, now);

Parameters:
calUnit -
d1 -
d2 -
Returns:
integer difference between two dates