|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.util.DateUtils
public class DateUtils
A Simple timestamp generator/formatter with timezone support.
Field Summary | |
---|---|
static java.text.SimpleDateFormat |
FORMAT
|
static java.util.TimeZone |
GMT
|
Constructor Summary | |
---|---|
DateUtils()
|
Method Summary | |
---|---|
static java.lang.String |
timeStamp()
Creates a formatted timestamp string of the current datetime using the local host timezone. |
static java.lang.String |
timeStamp(java.util.Date date)
Creates a formatted timestamp string of the given date using the local host timezone. |
static java.lang.String |
timeStamp(java.util.Date date,
java.util.TimeZone zone)
Creates a formatted timestamp string of the given date using the specified timezone. |
static java.lang.String |
timeStamp(long t)
Creates a formatted timestamp string of the given epoch using the local host timezone. |
static java.lang.String |
timeStampForZone(java.lang.String zoneID,
java.util.Date date)
Creates a formatted timestamp string of the given date using the given timezone ID. |
static java.lang.String |
timeStampGMT()
Creates a formatted timestamp string of the current date in GMT. |
static java.lang.String |
timeStampGMT(java.util.Date date)
Creates a formatted timestamp string of the given date in GMT. |
static java.lang.String |
timeStampGMT(long t)
Creates a formatted timestamp string of the given epoch in GMT. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.TimeZone GMT
public static final java.text.SimpleDateFormat FORMAT
Constructor Detail |
---|
public DateUtils()
Method Detail |
---|
public static final java.lang.String timeStamp()
public static final java.lang.String timeStamp(java.util.Date date)
date
-
public static final java.lang.String timeStamp(java.util.Date date, java.util.TimeZone zone)
date
- zone
-
public static final java.lang.String timeStamp(long t)
t
- unix epoch timestamp
public static final java.lang.String timeStampForZone(java.lang.String zoneID, java.util.Date date)
zoneID
- date
-
TimeZone.getTimeZone(String)
public static final java.lang.String timeStampGMT()
public static final java.lang.String timeStampGMT(java.util.Date date)
public static final java.lang.String timeStampGMT(long t)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |