com.sun.mdm.index.edm.util
Class DateUtil

java.lang.Object
  extended bycom.sun.mdm.index.edm.util.DateUtil

public class DateUtil
extends java.lang.Object

This class provides method to convert string to date and to convert date to string.


Field Summary
(package private) static java.lang.String DATE_FORMAT_STRING
           
(package private) static java.lang.String DATE_ONLY_FORMAT_STRING
           
(package private) static java.text.SimpleDateFormat SDFDATE
           
(package private) static java.text.SimpleDateFormat SDFDATEONLY
           
 
Method Summary
static java.lang.String date2String(java.util.Date date)
          This method converts a date format to string
static java.lang.String dateOnly2String(java.util.Date date)
          This method converts a date component to string
static void init()
          Gets the date format of the DateUtil class To be called before from login.
static java.util.Date string2Date(java.lang.String formatDate)
          This method convert a string format to date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_FORMAT_STRING

static java.lang.String DATE_FORMAT_STRING

DATE_ONLY_FORMAT_STRING

static java.lang.String DATE_ONLY_FORMAT_STRING

SDFDATE

static java.text.SimpleDateFormat SDFDATE

SDFDATEONLY

static java.text.SimpleDateFormat SDFDATEONLY
Method Detail

date2String

public static java.lang.String date2String(java.util.Date date)
This method converts a date format to string

Parameters:
date - a date data type
Returns:
date string

dateOnly2String

public static java.lang.String dateOnly2String(java.util.Date date)
This method converts a date component to string

Parameters:
date - a date data type
Returns:
date string

init

public static void init()
Gets the date format of the DateUtil class To be called before from login.


string2Date

public static java.util.Date string2Date(java.lang.String formatDate)
                                  throws ValidationException
This method convert a string format to date

Parameters:
formatDate - a string format date
Returns:
date
Throws:
ValidationException - thrown when validation fails


Sun Microsystems, Inc.