|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.fortuna.ical4j.util.Dates
public final class Dates
Implements a collection of utility methods relevant to date processing.
Field Summary | |
---|---|
static int |
DAYS_PER_WEEK
|
static long |
MILLIS_PER_DAY
|
static long |
MILLIS_PER_HOUR
|
static long |
MILLIS_PER_MINUTE
|
static long |
MILLIS_PER_SECOND
|
static long |
MILLIS_PER_WEEK
|
static int |
PRECISION_DAY
|
static int |
PRECISION_SECOND
|
Method Summary | |
---|---|
static int |
getAbsMonthDay(java.util.Date date,
int monthDay)
Returns the absolute month day for the month specified by the supplied date. |
static int |
getAbsWeekNo(java.util.Date date,
int weekNo)
Returns the absolute week number for the year specified by the supplied date. |
static int |
getAbsYearDay(java.util.Date date,
int yearDay)
Returns the absolute year day for the year specified by the supplied date. |
static java.util.Calendar |
getCalendarInstance(Date date)
Returns an instance of java.util.Calendar that is suitably
initialised for working with the specified date. |
static Date |
getInstance(java.util.Date date,
Value type)
Returns a new date instance of the specified type. |
static long |
round(long time,
int precision)
|
static long |
round(long time,
int precision,
java.util.TimeZone tz)
Rounds a time value to remove any precision smaller than specified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long MILLIS_PER_SECOND
public static final long MILLIS_PER_MINUTE
public static final long MILLIS_PER_HOUR
public static final long MILLIS_PER_DAY
public static final long MILLIS_PER_WEEK
public static final int DAYS_PER_WEEK
public static final int PRECISION_SECOND
public static final int PRECISION_DAY
Method Detail |
---|
public static int getAbsWeekNo(java.util.Date date, int weekNo)
IllegalArgumentException
will be thrown.
date
- weekNo
-
public static int getAbsYearDay(java.util.Date date, int yearDay)
IllegalArgumentException
will be thrown.
date
- yearDay
-
public static int getAbsMonthDay(java.util.Date date, int monthDay)
IllegalArgumentException
will be thrown.
date
- monthDay
-
public static Date getInstance(java.util.Date date, Value type)
date
- a seed Java date instancetype
- the type of date instance
net.fortuna.ical4j.model.Date
public static java.util.Calendar getCalendarInstance(Date date)
java.util.Calendar
that is suitably
initialised for working with the specified date.
date
- a date instance
java.util.Calendar
public static long round(long time, int precision)
time
- precision
-
public static long round(long time, int precision, java.util.TimeZone tz)
time
- the time value to round
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |