|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rapla.components.util.DateTools
public abstract class DateTools
Tools for manipulating dates. At the moment of writing rapla internaly stores all appointments in the GMT timezone.
Field Summary | |
---|---|
static int |
DAYS_PER_WEEK
|
static TimeZone |
GMT
|
static long |
MILLISECONDS_PER_DAY
|
static long |
MILLISECONDS_PER_HOUR
|
static long |
MILLISECONDS_PER_MINUTE
|
static long |
MILLISECONDS_PER_WEEK
|
Constructor Summary | |
---|---|
DateTools()
|
Method Summary | |
---|---|
static Date |
addDay(Date date)
Monday 24:00 = tuesday 0:00. |
static Date |
addDays(Date date,
int days)
see #addDay |
static long |
countDays(Date start,
Date end)
|
static Calendar |
createGMTCalendar()
|
static void |
cutDate(Calendar calendar)
sets time of day to 0:00. |
static Date |
cutDate(Date date)
sets time of day to 0:00. |
static long |
cutDate(long date)
sets time of day to 0:00. |
static Date |
fillDate(Date date)
|
static long |
fillDate(long date)
sets time of day to 0:00 and increases day. |
static int |
getHourOfDay(long date)
|
static int |
getMinuteOfHour(long date)
|
static TimeZone |
getTimeZone()
same as TimeZone.getTimeZone("GMT"). |
static boolean |
isMidnight(Date date)
|
static boolean |
isMidnight(long date)
|
static boolean |
isSameDay(Calendar calendar,
Date d1,
Date d2)
uses the calendar-object for date comparison. |
static boolean |
isSameDay(long d1,
long d2)
returns if the two dates are one the same date. |
static Date |
subDay(Date date)
|
static Date |
subDays(Date date,
int days)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DAYS_PER_WEEK
public static final long MILLISECONDS_PER_MINUTE
public static final long MILLISECONDS_PER_HOUR
public static final long MILLISECONDS_PER_DAY
public static final long MILLISECONDS_PER_WEEK
public static TimeZone GMT
Constructor Detail |
---|
public DateTools()
Method Detail |
---|
public static int getHourOfDay(long date)
public static int getMinuteOfHour(long date)
public static long cutDate(long date)
cutDate(Date)
public static boolean isMidnight(long date)
public static boolean isMidnight(Date date)
public static void cutDate(Calendar calendar)
cutDate(Date)
public static Date cutDate(Date date)
public static TimeZone getTimeZone()
public static long fillDate(long date)
fillDate(Date)
public static Date fillDate(Date date)
public static Date addDay(Date date)
subDay(java.util.Date)
,
addDays(java.util.Date, int)
public static Date addDays(Date date, int days)
public static Date subDay(Date date)
addDay(java.util.Date)
,
subDays(java.util.Date, int)
public static Date subDays(Date date, int days)
addDay(java.util.Date)
public static boolean isSameDay(long d1, long d2)
public static boolean isSameDay(Calendar calendar, Date d1, Date d2)
public static long countDays(Date start, Date end)
public static Calendar createGMTCalendar()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |