| java.lang.Object com.ivata.mask.web.format.DateFormatterConstants
DateFormatterConstants | public class DateFormatterConstants (Code) | | Contains all of the constants defining date formats used in
SettingDateFormatter SettingDateFormatter .
since: 2002-09-18 author: Colin MacLeod author: colin.macleod@ivata.com version: $Revision: 1.2 $ See Also: SettingDateFormatter |
Field Summary | |
final public static int | DATE_INPUT | final public static int | DATE_INPUT_DISPLAY | final public static int | DATE_LONG Use this for a long date format. | final public static int | DATE_LONG_DAY Use this for a long date format which includes the day of the
week. | final public static int | DATE_LONG_YEAR Use this for a long date format which includes the year. | final public static int | DATE_RELATIVE This creates a format which depends on how close the date is to
the
current date. | final public static int | DATE_SHORT Use this for a short date format. | final public static int | DATE_SHORT_RELATIVE This creates a format which depends on how close the date is to
the current date. | final public static int | DATE_SHORT_YEAR Use this for a short date format. | final public static int | TIME_INPUT | final public static int | TIME_INPUT_DISPLAY | final public static int | TIME_LONG Use this for a long time format. | final public static int | TIME_SHORT Use this for a short time format. |
DATE_INPUT | final public static int DATE_INPUT(Code) | | Specifies input format for date, should be less strict that
DATE_INPUT_DISPLAY .
|
DATE_INPUT_DISPLAY | final public static int DATE_INPUT_DISPLAY(Code) | | This format specifies the format of dates shown to the user
after he enters a correct date, should be more specific as
DATE_INPUT .
|
DATE_LONG | final public static int DATE_LONG(Code) | | Use this for a long date format. While the actual content of
this format
depends on the settings, it should include a representation for day
and month
and a text should be used for the month.
The setting for this date type is called "i18nDateLong".
|
DATE_LONG_DAY | final public static int DATE_LONG_DAY(Code) | | Use this for a long date format which includes the day of the
week. While
the actual
content of this format depends on the settings, it should include a
representation for day, month and week day and a text should be
used for the
month.
The setting for this date type is called "i18nDateLongDay".
|
DATE_LONG_YEAR | final public static int DATE_LONG_YEAR(Code) | | Use this for a long date format which includes the year. While
the actual
content of this format depends on the settings, it should include a
representation for day, month and year and a text should be used
for the
month.
The setting for this date type is called "i18nDateLongYear".
|
DATE_RELATIVE | final public static int DATE_RELATIVE(Code) | | This creates a format which depends on how close the date is to
the
current date. Typically, this works as follows:
how close are the dates? |
format used |
same day |
This depends on the time. If the time is before noon then
the 'date'
format will be "this morning". After noon but before 6pm, the
format is "this
afternoon", and after 6pm the format is "this evening". These
texts can
be
altered by the settings "i18nDateThisMorning",
"i18nDateThisAfternoon" and
"i18nDateThisEvening" respectively. |
previous day |
This depends on the time. If the time is before noon then
the 'date'
format will be "yesterday morning". After noon but before 6pm, the
format is
"yesterday afternoon", and after 6pm the format is "last
night". These
texts can be altered by the settings "i18nDateYesterdayMorning",
"i18nDateYesterdayAfternoon" and "i18nDateYesterdayEvening"
respectively. |
same week |
If both dates are in the same week, then the day is used,
e.g.
"Tuesday". This can be altered by changing the setting of
"i18nDateWeekDay". |
previous week |
Again the day is used but this time with "last", e.g. "last
Tuesday".
This can be altered by changing the setting of
"i18nDateLastWeekDay". |
same year |
If the years are the same then the format for the setting
"i18nDateLong"
is used. |
other |
For all other dates, the format for the setting
"i18nDateLongYear" is
used. |
|
DATE_SHORT | final public static int DATE_SHORT(Code) | | Use this for a short date format. While the actual content of
this format
depends on the settings, it should include a representation for day
and month
and numbers are normally used rather than text for the months.
|
DATE_SHORT_RELATIVE | final public static int DATE_SHORT_RELATIVE(Code) | | This creates a format which depends on how close the date is to
the current date. Typically, this works as follows:
how close are the dates? |
format used |
same day |
"Today". This text can be altered by the setting
"i18nDateShortToday". |
previous day |
"Yesterday". This text can be altered by the setting
"i18nDateShortYesterday". |
same week |
If both dates are in the same week, then the day is used,
e.g. "Tuesday". This can be altered by changing the setting of
"i18nDateWeekDay". |
same year |
If the years are the same then the format for the setting
"i18nDateShort"
is used. |
other |
For all other dates, the format for the setting
"i18nDateShortYear" is used. |
|
DATE_SHORT_YEAR | final public static int DATE_SHORT_YEAR(Code) | | Use this for a short date format. While the actual content of
this format depends on the settings, it should include a
representation for day and month and year and numbers are normally
used rather than text for the months.
|
TIME_INPUT | final public static int TIME_INPUT(Code) | | Specified input format for time, should be less strict that
TIME_INPUT_DISPLAY .
|
TIME_INPUT_DISPLAY | final public static int TIME_INPUT_DISPLAY(Code) | | This format specifies the format of times shown to the user
after he enters a correct time, should be more specific as
TIME_INPUT .
|
TIME_LONG | final public static int TIME_LONG(Code) | | Use this for a long time format. While the actual content of
this format
depends on the settings, it should include a representation for
hour,
minutes.
and seconds.
|
TIME_SHORT | final public static int TIME_SHORT(Code) | | Use this for a short time format. While the actual content of
this format
depends on the settings, it should include a representation for
hour and
minutes.
|
|
|