|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.samskivert.util.CalendarUtil
public class CalendarUtil
Contains some useful calendar related functions.
| Constructor Summary | |
|---|---|
CalendarUtil()
|
|
| Method Summary | |
|---|---|
static int |
getDaysBetween(Calendar d1,
Calendar d2)
Returns the difference between the dates represented by the two calendars in days, properly accounting for daylight savings time, leap seconds, etc. |
static int |
getMonthsBetween(Calendar start,
Calendar end)
Returns the number of whole months between the dates represented by the two calendar objects, truncating any remainder. |
static long |
getTimeBetween(long start,
long end)
Returns the absolute difference between two longs, which have the significance of acting as miliseconds since the Epoch. |
static void |
zeroTime(Calendar cal)
Set all the time components of the passed in calendar to zero. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CalendarUtil()
| Method Detail |
|---|
public static void zeroTime(Calendar cal)
public static long getTimeBetween(long start,
long end)
public static int getDaysBetween(Calendar d1,
Calendar d2)
From: http://www.jguru.com/forums/view.jsp?EID=489372
public static int getMonthsBetween(Calendar start,
Calendar end)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||