org.ow2.clif.analyze.lib.oda.util
Class DateUtil

java.lang.Object
  extended by org.ow2.clif.analyze.lib.oda.util.DateUtil

public final class DateUtil
extends java.lang.Object

A utility class. The convert method converts the source object into an Date object given specified type. If no reasonable conversion can be made, throw a OdaException.


Field Summary
static long count
          The count.
 
Constructor Summary
DateUtil()
           
 
Method Summary
static java.util.Date toDate(java.lang.Object source)
          Number -> Date new Date((long)Number) String -> Date toDate(String)
static java.util.Date toDate(java.lang.String source, com.ibm.icu.util.ULocale locale)
          convert String with the specified locale to java.util.Date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

public static long count
The count.

Constructor Detail

DateUtil

public DateUtil()
Method Detail

toDate

public static java.util.Date toDate(java.lang.Object source)
                             throws OdaException
Number -> Date new Date((long)Number) String -> Date toDate(String)

Parameters:
source -
Returns:
the date extract from the given object
Throws:
OdaException

toDate

public static java.util.Date toDate(java.lang.String source,
                                    com.ibm.icu.util.ULocale locale)
                             throws OdaException
convert String with the specified locale to java.util.Date

Parameters:
source - the String to be convert
locale - the locate of the string
Returns:
result Date
Throws:
OdaException - the oda exception