|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.runtime.op.date.DateCaster
public final class DateCaster
Class to cast Strings to Date Objects
Field Summary | |
---|---|
static boolean |
classicStyle
|
Constructor Summary | |
---|---|
DateCaster()
|
Method Summary | |
---|---|
static long |
fromShortTime(String str)
|
static DateTime |
toDateAdvanced(Object o,
boolean alsoNumbers,
TimeZone timeZone)
|
static DateTime |
toDateAdvanced(Object o,
boolean alsoNumbers,
TimeZone timeZone,
DateTime defaultValue)
|
static DateTime |
toDateAdvanced(Object o,
TimeZone timezone)
converts a Object to a DateTime Object (Advanced but slower) |
static DateTime |
toDateAdvanced(Object o,
TimeZone timeZone,
DateTime defaultValue)
converts a Object to a DateTime Object (Advanced but slower), returns null if invalid string |
static DateTime |
toDateAdvanced(String str,
boolean alsoNumbers,
TimeZone timeZone,
DateTime defaultValue)
converts a String to a DateTime Object (Advanced but slower), returns null if invalid string |
static DateTime |
toDateAdvanced(String str,
TimeZone timezone)
converts a Object to a DateTime Object (Advanced but slower) |
static DateTime |
toDateAdvanced(String str,
TimeZone timeZone,
DateTime defaultValue)
|
static DateTime |
toDateSimple(boolean b,
TimeZone timeZone)
converts a boolean to a DateTime Object |
static DateTime |
toDateSimple(char c,
TimeZone timeZone)
converts a char to a DateTime Object |
static DateTime |
toDateSimple(double d,
TimeZone timeZone)
converts a double to a DateTime Object |
static DateTime |
toDateSimple(Object o,
boolean alsoNumbers,
boolean alsoMonthString,
TimeZone timeZone)
converts a Object to a DateTime Object, returns null if invalid string |
static DateTime |
toDateSimple(Object o,
boolean alsoNumbers,
boolean alsoMonthString,
TimeZone timeZone,
DateTime defaultValue)
|
static DateTime |
toDateSimple(String str,
boolean alsoNumbers,
boolean alsoMonthString,
TimeZone timeZone)
converts a Object to a DateTime Object, returns null if invalid string |
static DateTime |
toDateSimple(String str,
boolean alsoNumbers,
boolean alsoMonthString,
TimeZone timeZone,
DateTime defaultValue)
converts the given string to a date following simple and fast parsing rules (no international formats) |
static DateTime |
toDateSimple(String str,
TimeZone timeZone)
converts a Object to a DateTime Object, returns null if invalid string |
static DateTime |
toDateTime(Locale locale,
String str,
TimeZone tz,
boolean useCommomDateParserAsWell)
parse a string to a Datetime Object |
static DateTime |
toDateTime(Locale locale,
String str,
TimeZone tz,
DateTime defaultValue,
boolean useCommomDateParserAsWell)
parse a string to a Datetime Object, returns null if can't convert |
static String |
toEuroDate(Object o,
TimeZone timeZone)
|
static String |
toShortTime(long time)
|
static Time |
toTime(TimeZone timeZone,
Object o)
converts a Object to a Time Object, returns null if invalid string |
static Time |
toTime(TimeZone timeZone,
String str,
Time defaultValue)
converts a String to a Time Object, returns null if invalid string |
static String |
toUSDate(Object o,
TimeZone timeZone)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean classicStyle
Constructor Detail |
---|
public DateCaster()
Method Detail |
---|
public static DateTime toDateAdvanced(Object o, TimeZone timezone) throws PageException
o
- Object to Converttimezone
-
PageException
public static DateTime toDateAdvanced(String str, TimeZone timezone) throws PageException
str
- String to Converttimezone
-
PageException
public static DateTime toDateAdvanced(Object o, TimeZone timeZone, DateTime defaultValue)
o
- Object to ConverttimeZone
- defaultValue
-
public static DateTime toDateAdvanced(String str, boolean alsoNumbers, TimeZone timeZone, DateTime defaultValue)
str
- String to converttimeZone
- defaultValue
-
public static DateTime toDateTime(Locale locale, String str, TimeZone tz, boolean useCommomDateParserAsWell) throws PageException
locale
- str
- String representation of a locale Datetz
-
PageException
public static DateTime toDateTime(Locale locale, String str, TimeZone tz, DateTime defaultValue, boolean useCommomDateParserAsWell)
locale
- str
- String representation of a locale Datetz
- defaultValue
-
public static DateTime toDateAdvanced(String str, TimeZone timeZone, DateTime defaultValue)
public static DateTime toDateSimple(boolean b, TimeZone timeZone)
b
- boolean to ConverttimeZone
-
public static DateTime toDateSimple(char c, TimeZone timeZone)
c
- char to ConverttimeZone
-
public static DateTime toDateSimple(double d, TimeZone timeZone)
d
- double to ConverttimeZone
-
public static DateTime toDateSimple(Object o, boolean alsoNumbers, boolean alsoMonthString, TimeZone timeZone) throws PageException
o
- Object to ConverttimeZone
-
PageException
public static DateTime toDateSimple(Object o, boolean alsoNumbers, boolean alsoMonthString, TimeZone timeZone, DateTime defaultValue)
public static DateTime toDateSimple(String str, TimeZone timeZone) throws PageException
str
- String to ConverttimeZone
-
PageException
public static Time toTime(TimeZone timeZone, Object o) throws PageException
o
- Object to Convert
PageException
public static DateTime toDateAdvanced(Object o, boolean alsoNumbers, TimeZone timeZone, DateTime defaultValue)
public static DateTime toDateSimple(String str, boolean alsoNumbers, boolean alsoMonthString, TimeZone timeZone) throws PageException
str
- Stringt to ConvertalsoNumbers
- timeZone
-
PageException
public static DateTime toDateAdvanced(Object o, boolean alsoNumbers, TimeZone timeZone) throws PageException
PageException
public static Time toTime(TimeZone timeZone, String str, Time defaultValue)
str
- String to convertdefaultValue
-
public static DateTime toDateSimple(String str, boolean alsoNumbers, boolean alsoMonthString, TimeZone timeZone, DateTime defaultValue)
str
- alsoNumbers
- alsoMonthString
- allow that the month is defined as english word (jan,janauary ...)timeZone
- defaultValue
-
public static String toUSDate(Object o, TimeZone timeZone) throws PageException
PageException
public static String toEuroDate(Object o, TimeZone timeZone) throws PageException
PageException
public static String toShortTime(long time)
public static long fromShortTime(String str)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |