railo.runtime.op.date
Class DateCaster

java.lang.Object
  extended by railo.runtime.op.date.DateCaster

public final class DateCaster
extends Object

Class to cast Strings to Date Objects


Field Summary
static boolean classicStyle
           
 
Constructor Summary
DateCaster()
           
 
Method Summary
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, TimeZone timeZone)
          converts a Object to a DateTime Object, returns null if invalid string
static DateTime toDateSimple(Object o, boolean alsoNumbers, TimeZone timeZone, DateTime defaultValue)
          converts a Object to a DateTime Object, returns null if invalid string
static DateTime toDateSimple(Object o, TimeZone timeZone)
          converts a Object to a DateTime Object, returns null if invalid string
static DateTime toDateSimple(String str, boolean alsoNumbers, TimeZone timeZone, DateTime defaultValue)
           
static DateTime toDateSimple(String str, TimeZone timeZone)
          converts a Object to a DateTime Object, returns null if invalid string
static String toEuroDate(Object o, TimeZone timeZone)
           
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

classicStyle

public static boolean classicStyle
Constructor Detail

DateCaster

public DateCaster()
Method Detail

toDateAdvanced

public static DateTime toDateAdvanced(Object o,
                                      TimeZone timezone)
                               throws PageException
converts a Object to a DateTime Object (Advanced but slower)

Parameters:
o - Object to Convert
timezone -
Returns:
Date Time Object
Throws:
PageException

toDateAdvanced

public static DateTime toDateAdvanced(String str,
                                      TimeZone timezone)
                               throws PageException
converts a Object to a DateTime Object (Advanced but slower)

Parameters:
str - String to Convert
timezone -
Returns:
Date Time Object
Throws:
PageException

toDateAdvanced

public static DateTime toDateAdvanced(Object o,
                                      TimeZone timeZone,
                                      DateTime defaultValue)
converts a Object to a DateTime Object (Advanced but slower), returns null if invalid string

Parameters:
o - Object to Convert
timeZone -
defaultValue -
Returns:
Date Time Object

toDateAdvanced

public 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

Parameters:
str - String to convert
timeZone -
defaultValue -
Returns:
Date Time Object

toDateAdvanced

public static DateTime toDateAdvanced(String str,
                                      TimeZone timeZone,
                                      DateTime defaultValue)

toDateSimple

public static DateTime toDateSimple(boolean b,
                                    TimeZone timeZone)
converts a boolean to a DateTime Object

Parameters:
b - boolean to Convert
timeZone -
Returns:
coverted Date Time Object

toDateSimple

public static DateTime toDateSimple(char c,
                                    TimeZone timeZone)
converts a char to a DateTime Object

Parameters:
c - char to Convert
timeZone -
Returns:
coverted Date Time Object

toDateSimple

public static DateTime toDateSimple(double d,
                                    TimeZone timeZone)
converts a double to a DateTime Object

Parameters:
d - double to Convert
timeZone -
Returns:
coverted Date Time Object

toDateSimple

public static DateTime toDateSimple(Object o,
                                    TimeZone timeZone)
                             throws PageException
converts a Object to a DateTime Object, returns null if invalid string

Parameters:
o - Object to Convert
timeZone -
Returns:
coverted Date Time Object
Throws:
PageException

toDateSimple

public static DateTime toDateSimple(String str,
                                    TimeZone timeZone)
                             throws PageException
converts a Object to a DateTime Object, returns null if invalid string

Parameters:
str - String to Convert
timeZone -
Returns:
coverted Date Time Object
Throws:
PageException

toTime

public static Time toTime(TimeZone timeZone,
                          Object o)
                   throws PageException
converts a Object to a Time Object, returns null if invalid string

Parameters:
o - Object to Convert
Returns:
coverted Date Time Object
Throws:
PageException

toDateSimple

public static DateTime toDateSimple(Object o,
                                    boolean alsoNumbers,
                                    TimeZone timeZone,
                                    DateTime defaultValue)
converts a Object to a DateTime Object, returns null if invalid string

Parameters:
o - Object to Convert
alsoNumbers -
timeZone -
defaultValue -
Returns:
coverted Date Time Object

toDateAdvanced

public static DateTime toDateAdvanced(Object o,
                                      boolean alsoNumbers,
                                      TimeZone timeZone,
                                      DateTime defaultValue)

toDateSimple

public static DateTime toDateSimple(Object o,
                                    boolean alsoNumbers,
                                    TimeZone timeZone)
                             throws PageException
converts a Object to a DateTime Object, returns null if invalid string

Parameters:
o - Object to Convert
alsoNumbers -
timeZone -
Returns:
coverted Date Time Object
Throws:
PageException

toDateAdvanced

public static DateTime toDateAdvanced(Object o,
                                      boolean alsoNumbers,
                                      TimeZone timeZone)
                               throws PageException
Throws:
PageException

toTime

public static Time toTime(TimeZone timeZone,
                          String str,
                          Time defaultValue)
converts a String to a Time Object, returns null if invalid string

Parameters:
str - String to convert
defaultValue -
Returns:
Time Object
Throws:

toDateSimple

public static DateTime toDateSimple(String str,
                                    boolean alsoNumbers,
                                    TimeZone timeZone,
                                    DateTime defaultValue)

toUSDate

public static String toUSDate(Object o,
                              TimeZone timeZone)
                       throws PageException
Throws:
PageException

toEuroDate

public static String toEuroDate(Object o,
                                TimeZone timeZone)
                         throws PageException
Throws:
PageException


Copyright © 2012 Railo