|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.fortuna.ical4j.util.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(Date date,
int monthDay)
Returns the absolute month day for the month specified by the supplied date. |
static int |
getAbsWeekNo(Date date,
int weekNo)
Returns the absolute week number for the year specified by the supplied date. |
static int |
getAbsYearDay(Date date,
int yearDay)
Returns the absolute year day for the year specified by the supplied date. |
static Calendar |
getCalendarInstance(Date date)
Returns an instance of java.util.Calendar that is suitably
initialised for working with the specified date. |
static Date |
getInstance(Date date,
Value type)
Returns a new date instance of the specified type. |
static long |
round(long time,
int precision)
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(Date date, int weekNo)
IllegalArgumentException
will be thrown.
date
- weekNo
-
public static int getAbsYearDay(Date date, int yearDay)
IllegalArgumentException
will be thrown.
date
- yearDay
-
public static int getAbsMonthDay(Date date, int monthDay)
IllegalArgumentException
will be thrown.
date
- monthDay
-
public static Date getInstance(Date date, Value type)
date
- a seed Java date instancetype
- the type of date instance
net.fortuna.ical4j.model.Date
public static 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 final long round(long time, int precision)
time
- the time value to round
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |