|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.commons.date.DateTimeUtil
public abstract class DateTimeUtil
Field Summary | |
---|---|
static int |
DAY
|
static int |
HOUR
|
static int |
MILLISECOND
|
static int |
MINUTE
|
static int |
MONTH
|
static int |
QUARTER
|
static int |
SECOND
|
static int |
WEEK
|
static int |
YEAR
|
Constructor Summary | |
---|---|
DateTimeUtil()
|
Method Summary | |
---|---|
int |
daysInMonth(int year,
int month)
return how much days given month in given year has |
abstract int |
getDay(TimeZone tz,
DateTime dt)
|
abstract int |
getDayOfWeek(Locale locale,
TimeZone tz,
DateTime dt)
|
abstract int |
getDayOfYear(Locale locale,
TimeZone tz,
DateTime dt)
|
abstract int |
getDaysInMonth(TimeZone tz,
DateTime dt)
|
abstract long |
getDiff(TimeZone tz,
int datePart,
DateTime left,
DateTime right)
|
abstract int |
getHour(TimeZone tz,
DateTime dt)
|
static DateTimeUtil |
getInstance()
|
abstract int |
getMilliSecond(TimeZone tz,
DateTime dt)
|
long |
getMilliSecondsAdMidnight(TimeZone timeZone,
long time)
|
abstract long |
getMilliSecondsInDay(TimeZone tz,
long time)
|
abstract int |
getMinute(TimeZone tz,
DateTime dt)
|
abstract int |
getMonth(TimeZone tz,
DateTime dt)
|
abstract int |
getSecond(TimeZone tz,
DateTime dt)
|
abstract int |
getWeekOfYear(Locale locale,
TimeZone tz,
DateTime dt)
|
abstract int |
getYear(TimeZone tz,
DateTime dt)
|
boolean |
isLeapYear(int year)
return if given is is a leap year or not |
boolean |
toBooleanValue(DateTime dateTime)
cast boolean value |
DateTime |
toDateTime(double days)
returns a date time instance by a number, the conversion from the double to date is o the base of the CFML rules. |
DateTime |
toDateTime(TimeZone tz,
int year,
int month,
int day,
int hour,
int minute,
int second,
int milliSecond)
|
DateTime |
toDateTime(TimeZone tz,
int year,
int month,
int day,
int hour,
int minute,
int second,
int milliSecond,
DateTime defaultValue)
|
double |
toDoubleValue(DateTime dateTime)
|
abstract String |
toString(DateTime dt,
TimeZone tz)
|
long |
toTime(TimeZone tz,
int year,
int month,
int day,
int hour,
int minute,
int second,
int milliSecond)
|
long |
toTime(TimeZone tz,
int year,
int month,
int day,
int hour,
int minute,
int second,
int milliSecond,
long defaultValue)
|
int |
toYear(int year)
translate 2 digit numbers to a year; for example 10 to 2010 or 50 to 1950 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SECOND
public static final int MINUTE
public static final int HOUR
public static final int DAY
public static final int YEAR
public static final int MONTH
public static final int WEEK
public static final int QUARTER
public static final int MILLISECOND
Constructor Detail |
---|
public DateTimeUtil()
Method Detail |
---|
public static DateTimeUtil getInstance()
public DateTime toDateTime(TimeZone tz, int year, int month, int day, int hour, int minute, int second, int milliSecond) throws DateTimeException
DateTimeException
public DateTime toDateTime(TimeZone tz, int year, int month, int day, int hour, int minute, int second, int milliSecond, DateTime defaultValue)
public DateTime toDateTime(double days)
days
- double value to convert to a number
public long toTime(TimeZone tz, int year, int month, int day, int hour, int minute, int second, int milliSecond, long defaultValue)
public long toTime(TimeZone tz, int year, int month, int day, int hour, int minute, int second, int milliSecond) throws DateTimeException
DateTimeException
public int daysInMonth(int year, int month)
year
- month
-
public int toYear(int year)
year
-
public boolean isLeapYear(int year)
year
-
public boolean toBooleanValue(DateTime dateTime) throws DateTimeException
dateTime
-
ExpressionException
DateTimeException
public double toDoubleValue(DateTime dateTime)
public long getMilliSecondsAdMidnight(TimeZone timeZone, long time)
public abstract int getYear(TimeZone tz, DateTime dt)
public abstract int getMonth(TimeZone tz, DateTime dt)
public abstract int getDay(TimeZone tz, DateTime dt)
public abstract int getHour(TimeZone tz, DateTime dt)
public abstract int getMinute(TimeZone tz, DateTime dt)
public abstract int getSecond(TimeZone tz, DateTime dt)
public abstract int getMilliSecond(TimeZone tz, DateTime dt)
public abstract long getMilliSecondsInDay(TimeZone tz, long time)
public abstract int getDaysInMonth(TimeZone tz, DateTime dt)
public abstract int getDayOfYear(Locale locale, TimeZone tz, DateTime dt)
public abstract int getDayOfWeek(Locale locale, TimeZone tz, DateTime dt)
public abstract int getWeekOfYear(Locale locale, TimeZone tz, DateTime dt)
public abstract long getDiff(TimeZone tz, int datePart, DateTime left, DateTime right)
public abstract String toString(DateTime dt, TimeZone tz)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |