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.
|
ByteBuffer |
formatBuffer(long date) |
protected void |
formatNow() |
String |
getFormatString() |
static Timer |
getTimer() |
TimeZone |
getTimeZone() |
String |
now() |
void |
setTimeZone(TimeZone tz)
Set the timezone.
|
void |
setTimeZoneID(String timeZoneId)
Set the timezone.
|
public static final String DEFAULT_FORMAT
public DateCache()
public DateCache(String format)
public DateCache(String format, DateFormatSymbols s)
public static Timer getTimer()
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 String now()
protected void formatNow()
public void format(long inDate,
StringBuilder buffer)
inDate - Date the formatbuffer - StringBuilderpublic String getFormatString()
public ByteBuffer formatBuffer(long date)
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.