Object <- DateTimeFormatter |
|
|
FormatDate FormatTime ScanTime ValidTimeCharacter |
|
Display24HourTime FirstDayOfFormattedWeek MinutesSeparator NumericDateFormat ShowAMPMBeforeTime ShowEightDaysInWeek |
| Field | Type | |
|---|---|---|
| DateTimeFormatter: | calendar: | Calendar |
| firstDayOfFormattedWeek: | UnsignedShort | |
| numericDateFormat: | UnsignedShort | |
| showEightDaysInWeek: | Boolean | |
| display24HourTime: | Boolean | |
| showAMPMBeforeTime: | Boolean |
Define Class DateTimeFormatter; inherits from Object, HasLocale; abstract; field calendar: Calendar; field firstDayOfFormattedWeek: UnsignedShort, getter; field numericDateFormat: UnsignedShort, getter; field showEightDaysInWeek: Boolean, getter; field display24HourTime: Boolean, getter, setter; field showAMPMBeforeTime: Boolean, getter; attribute FirstDayOfFormattedWeek: UnsignedShort, readOnly; // the week day that should be displayed as the first day of the week, 1 -> Sunday etc. attribute ShowEightDaysInWeek: Boolean, readOnly; // whether weekly calendars using 2*4 arrangements should add the first day of the following week to their display attribute NumericDateFormat: UnsignedShort, readOnly; // see values in DateTime.h attribute Display24HourTime: Boolean; // whether to prefer 24 hour time formats attribute ShowAMPMBeforeTime: Boolean, readOnly; // whether a time picker should show AM/PM selection before hours/minutes in 12 hour format attribute MinutesSeparator: Text, readOnly, noGetter; // the text that's inserted between hours and minutes // date and time formatting operations operation FormatDate(date: Signed; flags: Unsigned): Text, noMethod; // produce a text object representing the specified date // flag values are defined in DateTime.h operation FormatTime(milliseconds: Unsigned; flags: Unsigned): Text, noMethod; // produce a text object representing the specified time // flag values are defined in DateTime.h // date and time scanning operations operation ScanTime(timeText: HasText; var time: Unsigned; var charactersUsed: Unsigned): UnsignedShort, noMethod; // scans beginning of timeText into time; returns 0 if can't parse, 1 if result AM/PM ambiguous, 2 otherwise // returns number of characters consumed in charactersUsed (pass nil if not interested) // support operations operation ValidTimeCharacter(theCharacter: Character): Boolean, noMethod; end class;