|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.util.DateTimeFormat
public abstract class DateTimeFormat
Formats dates in a locale-sensitive manner.
| Field Summary | |
|---|---|
static int |
LONG
Constant used to specify long format for both dates and times. |
static int |
SHORT
Constant used to specify short format for both dates and times. |
| Method Summary | |
|---|---|
abstract java.lang.String |
format(DateTime date)
Returns a string formatted according to the style(s) passed to the appropriate method that was used to create the DateTimeFormat. |
static DateTimeFormat |
getDateInstance(int style)
Returns a platform-dependent version of DateTimeFormat that can be used to create a date string formatted in the given style. |
static DateTimeFormat |
getDateTimeInstance(int dateStyle,
int timeStyle)
Returns a platform-dependent version of DateTimeFormat that can be used to create a date-time string formatted in the given styles. |
static DateTimeFormat |
getLocalDateInstance()
Returns a platform-dependent version of DateTimeFormat that can be used to create a date string formatted in the style typically found in item display tables. |
static DateTimeFormat |
getLocalDateTimeInstance()
Returns a platform-dependent version of DateTimeFormat that can be used to create a date/time string formatted in the style typically found in item display tables. |
static DateTimeFormat |
getTimeInstance(int style)
Returns a platform-dependent version of DateTimeFormat that can be used to create a time string formatted in the given style. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SHORT
public static final int LONG
| Method Detail |
|---|
public static DateTimeFormat getLocalDateTimeInstance()
public static DateTimeFormat getLocalDateInstance()
public static DateTimeFormat getTimeInstance(int style)
style - Either DateTimeFormat.SHORT or DateTimeFormat.LONG, determines
the format of the resulting time string.
public static DateTimeFormat getDateInstance(int style)
style - Either DateTimeFormat.SHORT or DateTimeFormat.LONG, determines
the format of the resulting date string.
public static DateTimeFormat getDateTimeInstance(int dateStyle,
int timeStyle)
dateStyle - Either DateTimeFormat.SHORT or DateTimeFormat.LONG, determines
the format of the date portion of the resulting string.timeStyle - Either DateTimeFormat.SHORT or DateTimeFormat.LONG, determines
the format of the time portion of the resulting string.
public abstract java.lang.String format(DateTime date)
date - The date whose value is formatted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||