This class exposes the NLS properties related to Date, Time and Number formats. More...
Static Public Member Functions | |
_.Library.String | GetFormatItem (_.Library.String item) |
Gets a format item from the current process context<br> More... | |
_.Library.String | SetFormatItem (_.Library.String item, _.Library.String val) |
Sets a format item in the current process context<br> More... | |
_.Library.Boolean | UseLocale (_.Library.Boolean new) |
Gets the system flag that indicates whether date/time/number. More... | |
Public Attributes | |
AM | |
Sufix which may optionally be appended to time values. More... | |
DateFormat | |
The DateFormat code used whenever a $ZDATE, $ZDATEH,. More... | |
DateMaximum | |
The maximum value for a date allowed in $ZDATE, $ZDATEH,. More... | |
DateMinimum | |
The minimum value for a date allowed in $ZDATE, $ZDATEH,. More... | |
DateSeparator | |
The character used to delimit the months, days, and years. More... | |
DecimalSeparator | |
The character used by the $FNUMBER function to separate. More... | |
Locale | |
This property controls the source of the formats. More... | |
Midnight | |
The suffix which may optionally be appended to time. More... | |
MinusSign | |
The character which may precede or follow a negative. More... | |
MonthAbbr | |
The abbreviations of the names of the twelve months,. More... | |
MonthName | |
The full names of the twelve months, used whenever a. More... | |
Noon | |
The suffix which may optionally be appended to time values. More... | |
NumericGroupSeparator | |
The character used to separate groups of numeric digits. More... | |
NumericGroupSize | |
The number of digits in a numeric group formatted by the. More... | |
PM | |
The suffix which may optionally be appended to time values. More... | |
PlusSign | |
The character which may optionally precede or follow a. More... | |
TimeFormat | |
The TimeFormat code used whenever a $ZDATETIME, $ZDATETIMEH,. More... | |
TimePrecision | |
The number of fractional digits displayed in a time value. More... | |
TimeSeparator | |
The character used to delimit the hours, minutes and seconds. More... | |
WeekdayAbbr | |
The abbreviations of the names of the seven days of the. More... | |
WeekdayName | |
The full names of the seven days of the week, starting. More... | |
YearOption | |
The YearOption code used whenever a $ZDATE, $ZDATEH,. More... | |
This class exposes the NLS properties related to Date, Time and Number formats.
Their initial values come from the current locale defaults. Changing a property of an instantiated object affects only the current process. For more details see the documentation for $ZDATE, $ZDATEH, $FNUMBER.
For generic locale properties see <class>SYS.NLS.Locale</class>.
For system and process NLS table settings see <class>SYS.NLS.Table</class>.
For current device NLS properties see <class>SYS.NLS.Device</class>.
|
static |
Gets a format item from the current process context<br>
Parameter:
Returns: selected item or "" in case of error
|
static |
Sets a format item in the current process context<br>
Parameters:
Returns: previous item value or "" in case of error
|
static |
Gets the system flag that indicates whether date/time/number.
functions should use the locale format by default. Besides, if a new boolean flag is passed as an argument, the system flag is set to this new value. A system reboot or locale reload is necessary to activate the change.
Parameter: (optional)
Returns: previous value of the system locale format flag
AM |
Sufix which may optionally be appended to time values.
prior to 12 noon.
Example: "AM"
DateFormat |
The DateFormat code used whenever a $ZDATE, $ZDATEH,.
$ZDATETIME or $ZDATETIMEH function call omits its second parameter, or specifies a second parameter value of -1.
Example: 1
DateMaximum |
The maximum value for a date allowed in $ZDATE, $ZDATEH,.
$ZDATETIME or $ZDATETIMEH functions.
Example: 94232 (12/30/2098)
DateMinimum |
The minimum value for a date allowed in $ZDATE, $ZDATEH,.
$ZDATETIME or $ZDATETIMEH functions.
Example: 1
DateSeparator |
The character used to delimit the months, days, and years.
of those dates which are otherwise entirely numeric.
Example: "/"
DecimalSeparator |
The character used by the $FNUMBER function to separate.
the whole part of a number from the fractional part of the number. Also used by $ZDATETIME, $ZDATETIMEH, $ZTIME and $ZTIMEH to separate the whole part of the seconds from the optional fractional part of the seconds, if any.
Example: "."
This property controls the source of the formats.
Locale="" means that the system default formats (usually US English) are in effect for the current process.
Locale="<locale name>" (eg: "rusw" or "csy8") means that the formats come from that locale.
This property may be changed after the object is instantiated or by passing the desired locale to New. For example:
Set fmt=##class(SYS.NLS.Format).New("jpnw")
As a convenience, the word "Current" can be used instead of a locale name in order to mean the current locale.
Midnight |
The suffix which may optionally be appended to time.
values corresponding to exactly 12 midnight.
Example: "MIDNIGHT"
MinusSign |
The character which may precede or follow a negative.
numeric quantity formatted by the $FNUMBER function.
Example: "-"
MonthAbbr |
The abbreviations of the names of the twelve months,.
used whenever a $ZDATE, $ZDATEH, $ZDATETIME or $ZDATETIMEH function call omits its MonthNameList parameter, or specifies a MonthNameList parameter value of -1, and the selected date format uses month name abbreviations (i.e., the effective DateFormat code is 0, 2, 5, 6 or 7)
Example: " Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"
MonthName |
The full names of the twelve months, used whenever a.
$ZDATE, $ZDATEH, $ZDATETIME or $ZDATETIMEH function call omits its MonthNameList parameter, or specifies a MonthNameList parameter value of -1, and the selected date format uses full month names (i.e., the effective DateFormat code is 9).
Example: " January February March April... November December"
Noon |
The suffix which may optionally be appended to time values.
corresponding to exactly 12 noon.
Example: "NOON"
NumericGroupSeparator |
The character used to separate groups of numeric digits.
within the whole number portion of a number formatted by the $FNUMBER function.
Example: ","
NumericGroupSize |
The number of digits in a numeric group formatted by the.
$FNUMBER function.
Example: 3
PM |
The suffix which may optionally be appended to time values.
at or after 12 noon.
Example: "PM"
PlusSign |
The character which may optionally precede or follow a.
non-negative numeric quantity formatted by the $FNUMBER function.
Example: "+"
TimeFormat |
The TimeFormat code used whenever a $ZDATETIME, $ZDATETIMEH,.
$ZTIME or $ZTIMEH function call omits its TimeFormat parameter, or specifies a TimeFormat parameter value of -1.
Example: 1
TimePrecision |
The number of fractional digits displayed in a time value.
whenever a $ZDATETIME or $ZTIME function call omits its Precision parameter, or specifies a Precision parameter value of -1.
Example: 0
TimeSeparator |
The character used to delimit the hours, minutes and seconds.
in a time value.
Example: ":"
WeekdayAbbr |
The abbreviations of the names of the seven days of the.
week, starting with Sunday and ending with Saturday, used whenever a $ZDATE or $ZDATEIME function call selects a date format which uses weekday name abbreviations (i.e., the effective DateFormat code is 11).
Example: " Sun Mon Tue Wed Thu Fri Sat"
WeekdayName |
The full names of the seven days of the week, starting.
with Sunday and ending with Saturday, used whenever a $ZDATE or $ZDATEIME function call selects a date format which uses full weekday names (i.e., the effective DateFormat code is 12).
Example: " Sunday Monday Tuesday... Friday Saturday"
YearOption |
The YearOption code used whenever a $ZDATE, $ZDATEH,.
$ZDATETIME or $ZDATETIMEH function call omits its YearOption parameter, or specifies a YearOption parameter value of -1.
Example: 0