public class DateFormatter
extends JaretDateFormatter
Constructor and Description |
---|
DateFormatter()
Default constructor unsing default locale.
|
DateFormatter(java.util.Locale locale)
Construcor specifying a locale.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
generateDisplayString(JaretDate date)
Generate a textual representation of the given JaretDate.
|
java.lang.String |
generateDisplayStringDate(JaretDate date)
Generate a textual representation of the given JaretDate.
|
java.lang.String |
getDayOfWeekString(int dayOfWeek)
Retrieve a localized name for the day of the week.
|
java.lang.String |
getLabel(JaretDate arg0,
Format arg1) |
java.util.Locale |
getLocale()
Retrieve the used locale.
|
java.lang.String |
getMonthString(int month) |
java.lang.String |
getShortDayOfWeekString(int dayOfWeek) |
java.lang.String |
getShortMonthString(int month) |
int |
hashCode() |
java.util.Date |
parseTextualDate(java.lang.String text) |
static java.lang.String |
secondsToDisplayString(int sec)
Generate an output of the format hh:mm:ss for a given number of seconds.
|
void |
setLocale(java.util.Locale locale)
Set the locale for this JaretDateFormatter.
|
java.lang.String |
toDisplayStringTime(JaretDate date,
boolean seconds)
Generates a textual representation of the time only.
|
public DateFormatter(java.util.Locale locale)
locale
- locale to be usedpublic DateFormatter()
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
locale
- Locale to be usedpublic java.util.Date parseTextualDate(java.lang.String text)
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.lang.String generateDisplayString(JaretDate date)
date
- the JaretDate to be formattedpublic java.lang.String generateDisplayStringDate(JaretDate date)
date
- the JaretDate to be formattedpublic static java.lang.String secondsToDisplayString(int sec)
sec
- Secondspublic java.lang.String getDayOfWeekString(int dayOfWeek)
dayOfWeek
- public java.lang.String getMonthString(int month)
public java.lang.String getShortDayOfWeekString(int dayOfWeek)
public java.lang.String getShortMonthString(int month)
public java.lang.String toDisplayStringTime(JaretDate date, boolean seconds)
date
- JaretDate to be represenetdseconds
- if true seconds will be included (hh:mm:ss), hh:mm otherwisepublic java.lang.String getLabel(JaretDate arg0, Format arg1)