|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sap.ip.me.api.services.DateConverter
This class serves as a converter utility for date/time conversion.
Field Summary | |
static int |
DEFAULTDAY
Default value for Calendar's unused DATE field. |
static int |
DEFAULTHOUR
Default value for Calendar's unused HOUR_OF_DAY field. |
static int |
DEFAULTMILLISECOND
Default value for Calendar's unused MILLISECOND field. |
static int |
DEFAULTMINUTE
Default value for Calendar's unused MINUTE field. |
static int |
DEFAULTMONTH
Default value for Calendar's unused MONTH field. |
static int |
DEFAULTSECOND
Default value for Calendar's unused MINUTE field. |
static int |
DEFAULTYEAR
Default value for Calendar's unused YEAR field. |
static java.util.Calendar |
INIT_CALENDAR
Static Calendar instance that maybe used for value comparison. |
Constructor Summary | |
DateConverter()
|
Method Summary | |
static java.util.Calendar |
createInitializedCalendar()
Returns a Calendar instance with values set to 1970/00/01 00:00:00:000. |
static java.sql.Date |
dateToSqlDate(java.util.Date date)
Returns a java.sql.Date instance for the specified java.util.Date. |
static java.sql.Time |
dateToSqlTime(java.util.Date date)
Returns a java.sql.Time instance for the specified java.util.Date. |
static java.util.Calendar |
sqlDateTimeToCalendar(java.sql.Date date,
java.sql.Time time)
Returns a java.util.Calendar instance for the specified java.sql.Date and java.sql.Time. |
static java.util.Calendar |
sqlDateTimeToCalendar(java.sql.Date date,
java.sql.Time time,
java.util.Locale locale)
Returns a java.util.Calendar instance for the specified java.sql.Date, java.sql.Time and locale. |
static java.util.Calendar |
sqlDateTimeToCalendar(java.sql.Date date,
java.sql.Time time,
java.util.TimeZone timeZone)
Returns a java.util.Calendar instance for the specified java.sql.Date, java.sql.Time and timeZone. |
static java.util.Calendar |
sqlDateTimeToCalendar(java.sql.Date date,
java.sql.Time time,
java.util.TimeZone timeZone,
java.util.Locale locale)
Returns a java.util.Calendar instance for the specified java.sql.Date, java.sql.Time timeZone and locale. |
static java.util.Date |
sqlDateToDate(java.sql.Date date)
Returns a java.util.Date instance for the specified java.sql.Date |
static java.util.Date |
sqlTimeToDate(java.sql.Time time)
Returns a java.util.Date instance for the specified java.sql.Time |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULTYEAR
public static final int DEFAULTMONTH
public static final int DEFAULTDAY
public static final int DEFAULTHOUR
public static final int DEFAULTMINUTE
public static final int DEFAULTSECOND
public static final int DEFAULTMILLISECOND
public static final java.util.Calendar INIT_CALENDAR
Constructor Detail |
public DateConverter()
Method Detail |
public static java.sql.Date dateToSqlDate(java.util.Date date)
date
- the specified java.util.Date object to be converted
public static java.sql.Time dateToSqlTime(java.util.Date date)
date
- the specified java.util.Date object to be converted
public static java.util.Date sqlTimeToDate(java.sql.Time time)
time
- the specified java.sql.Time object to be converted
public static java.util.Date sqlDateToDate(java.sql.Date date)
date
- the specified java.sql.Date object to be converted
public static java.util.Calendar sqlDateTimeToCalendar(java.sql.Date date, java.sql.Time time, java.util.TimeZone timeZone, java.util.Locale locale)
date
- the specified java.sql.Datetime
- the specified java.sql.TimetimeZone
- the specified TimeZonelocale
- the specified Locale
public static java.util.Calendar sqlDateTimeToCalendar(java.sql.Date date, java.sql.Time time, java.util.TimeZone timeZone)
date
- the specified java.sql.Datetime
- the specified java.sql.TimetimeZone
- the specified TimeZone
public static java.util.Calendar sqlDateTimeToCalendar(java.sql.Date date, java.sql.Time time, java.util.Locale locale)
date
- the specified java.sql.Datetime
- the specified java.sql.Timelocale
- the specified Locale
public static java.util.Calendar sqlDateTimeToCalendar(java.sql.Date date, java.sql.Time time)
date
- the specified java.sql.Datetime
- the specified java.sql.Time
public static java.util.Calendar createInitializedCalendar()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |