public class DateCache extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_FORMAT |
| Constructor and Description |
|---|
DateCache()
Constructor.
|
DateCache(String format)
Constructor.
|
DateCache(String format,
DateFormatSymbols s) |
DateCache(String format,
Locale l) |
| Modifier and Type | Method and Description |
|---|---|
String |
format(Date inDate)
Format a date according to our stored formatter.
|
String |
format(long inDate)
Format a date according to our stored formatter.
|
void |
format(long inDate,
StringBuilder buffer)
Format to string buffer.
|
SimpleDateFormat |
getFormat()
Get the format.
|
String |
getFormatString() |
TimeZone |
getTimeZone() |
int |
lastMs() |
String |
now() |
void |
setTimeZone(TimeZone tz)
Set the timezone.
|
void |
setTimeZoneID(String timeZoneId)
Set the timezone.
|
public static String DEFAULT_FORMAT
public DateCache()
public DateCache(String format)
public DateCache(String format, DateFormatSymbols s)
public void setTimeZone(TimeZone tz)
tz - TimeZonepublic TimeZone getTimeZone()
public void setTimeZoneID(String timeZoneId)
timeZoneId - TimeZoneId the ID of the zone as used by
TimeZone.getTimeZone(id)public String format(Date inDate)
inDate - public String format(long inDate)
inDate - public void format(long inDate,
StringBuilder buffer)
inDate - Date the formatbuffer - StringBuilderpublic SimpleDateFormat getFormat()
public String getFormatString()
public String now()
public int lastMs()
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.