|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.emi.emir.client.util.DateUtil
public class DateUtil
| Nested Class Summary | |
|---|---|
static class |
DateUtil.DurationType
|
| Field Summary | |
|---|---|
static SimpleDateFormat |
ISODateFormat
|
static SimpleDateFormat |
ServiceDateFormat
|
static SimpleDateFormat |
UTCISODateFormat
|
| Constructor Summary | |
|---|---|
DateUtil()
|
|
| Method Summary | |
|---|---|
static org.codehaus.jettison.json.JSONObject |
addDate(org.codehaus.jettison.json.JSONObject jo,
String attrName,
Date d)
|
static Date |
addDays(Date date,
Integer days)
Add days to the given date |
static Date |
addDays(Integer days)
Add days to the current date |
static Date |
addHours(Date date,
Integer hours)
Add hours to the given date |
static Date |
addHours(Integer hours)
Add hours to the current date |
static Duration |
duration(Calendar fromDate,
Calendar toDate)
Calculate duration between different times |
static Date |
fromXmlGregorian(XMLGregorianCalendar xmlCal)
|
static Date |
getDate(org.codehaus.jettison.json.JSONObject json)
|
static Boolean |
hasDateSubObject(Object object)
Checks whether given json document has nested json date object |
static org.codehaus.jettison.json.JSONObject |
setCreationTime(org.codehaus.jettison.json.JSONObject jo,
Integer days)
|
static org.codehaus.jettison.json.JSONObject |
setExpiryTime(org.codehaus.jettison.json.JSONObject jo,
Integer days)
|
static org.codehaus.jettison.json.JSONObject |
setExpiryTimeWithHours(org.codehaus.jettison.json.JSONObject jo,
Integer hours)
|
static String |
toUTCFormat(Date d)
|
static Date |
toUTCFormat(String d)
|
static XMLGregorianCalendar |
toXmlGregorian(Date d)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final SimpleDateFormat ServiceDateFormat
public static final SimpleDateFormat ISODateFormat
public static final SimpleDateFormat UTCISODateFormat
| Constructor Detail |
|---|
public DateUtil()
| Method Detail |
|---|
public static org.codehaus.jettison.json.JSONObject setCreationTime(org.codehaus.jettison.json.JSONObject jo,
Integer days)
public static org.codehaus.jettison.json.JSONObject setExpiryTime(org.codehaus.jettison.json.JSONObject jo,
Integer days)
public static org.codehaus.jettison.json.JSONObject setExpiryTimeWithHours(org.codehaus.jettison.json.JSONObject jo,
Integer hours)
public static org.codehaus.jettison.json.JSONObject addDate(org.codehaus.jettison.json.JSONObject jo,
String attrName,
Date d)
public static Date addDays(Date date,
Integer days)
public static Date addDays(Integer days)
public static Date addHours(Date date,
Integer hours)
public static Date addHours(Integer hours)
public static Date getDate(org.codehaus.jettison.json.JSONObject json)
throws JSONToGlue2MappingException
resJson -
JSONToGlue2MappingExceptionpublic static String toUTCFormat(Date d)
public static Date toUTCFormat(String d)
throws ParseException
ParseException
public static XMLGregorianCalendar toXmlGregorian(Date d)
throws DatatypeConfigurationException
DatatypeConfigurationException
public static Date fromXmlGregorian(XMLGregorianCalendar xmlCal)
throws DatatypeConfigurationException
DatatypeConfigurationExceptionpublic static Boolean hasDateSubObject(Object object)
object -
public static Duration duration(Calendar fromDate,
Calendar toDate)
fromDate - toDate - The date in future or greater than the fromDate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||