%SYS.NLS.Format
class %SYS.NLS.Format extends %Library.RegisteredObject, %SYSTEM.Help
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 %SYS.NLS.Locale.
For system and process NLS table settings see %SYS.NLS.Table.
For current device NLS properties see %SYS.NLS.Device.
Property Inventory
- AM
- DateFormat
- DateMaximum
- DateMinimum
- DateSeparator
- DecimalSeparator
- Locale
- Midnight
- MinusSign
- MonthAbbr
- MonthName
- Noon
- NumericGroupSeparator
- NumericGroupSize
- PM
- PlusSign
- TimeFormat
- TimePrecision
- TimeSeparator
- WeekdayAbbr
- WeekdayName
- YearOption
Method Inventory
Properties
property AM as %String;
Sufix which may optionally be appended to time values
prior to 12 noon.
Example: "AM"
Example: "AM"
Property methods: AMDisplayToLogical(), AMIsValid(), AMLogicalToDisplay(), AMLogicalToOdbc(), AMNormalize()
property DateFormat as %Integer;
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
Example: 1
Property methods: DateFormatDisplayToLogical(), DateFormatIsValid(), DateFormatLogicalToDisplay(), DateFormatNormalize()
property DateMaximum as %Integer;
The maximum value for a date allowed in $ZDATE, $ZDATEH,
$ZDATETIME or $ZDATETIMEH functions.
Example: 94232 (12/30/2098)
Example: 94232 (12/30/2098)
Property methods: DateMaximumDisplayToLogical(), DateMaximumIsValid(), DateMaximumLogicalToDisplay(), DateMaximumNormalize()
property DateMinimum as %Integer;
The minimum value for a date allowed in $ZDATE, $ZDATEH,
$ZDATETIME or $ZDATETIMEH functions.
Example: 1
Example: 1
Property methods: DateMinimumDisplayToLogical(), DateMinimumIsValid(), DateMinimumLogicalToDisplay(), DateMinimumNormalize()
property DateSeparator as %String;
The character used to delimit the months, days, and years
of those dates which are otherwise entirely numeric.
Example: "/"
Example: "/"
Property methods: DateSeparatorDisplayToLogical(), DateSeparatorIsValid(), DateSeparatorLogicalToDisplay(), DateSeparatorLogicalToOdbc(), DateSeparatorNormalize()
property DecimalSeparator as %String;
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: "."
Example: "."
Property methods: DecimalSeparatorDisplayToLogical(), DecimalSeparatorIsValid(), DecimalSeparatorLogicalToDisplay(), DecimalSeparatorLogicalToOdbc(), DecimalSeparatorNormalize()
property Locale as %String;
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.
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.
Property methods: LocaleDisplayToLogical(), LocaleIsValid(), LocaleLogicalToDisplay(), LocaleLogicalToOdbc(), LocaleNormalize()
property Midnight as %String;
The suffix which may optionally be appended to time
values corresponding to exactly 12 midnight.
Example: "MIDNIGHT"
Example: "MIDNIGHT"
Property methods: MidnightDisplayToLogical(), MidnightIsValid(), MidnightLogicalToDisplay(), MidnightLogicalToOdbc(), MidnightNormalize()
property MinusSign as %String;
The character which may precede or follow a negative
numeric quantity formatted by the $FNUMBER function.
Example: "-"
Example: "-"
Property methods: MinusSignDisplayToLogical(), MinusSignIsValid(), MinusSignLogicalToDisplay(), MinusSignLogicalToOdbc(), MinusSignNormalize()
property MonthAbbr as %String;
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"
Example: " Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"
Property methods: MonthAbbrDisplayToLogical(), MonthAbbrIsValid(), MonthAbbrLogicalToDisplay(), MonthAbbrLogicalToOdbc(), MonthAbbrNormalize()
property MonthName as %String;
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"
Example: " January February March April... November December"
Property methods: MonthNameDisplayToLogical(), MonthNameIsValid(), MonthNameLogicalToDisplay(), MonthNameLogicalToOdbc(), MonthNameNormalize()
property Noon as %String;
The suffix which may optionally be appended to time values
corresponding to exactly 12 noon.
Example: "NOON"
Example: "NOON"
Property methods: NoonDisplayToLogical(), NoonIsValid(), NoonLogicalToDisplay(), NoonLogicalToOdbc(), NoonNormalize()
property NumericGroupSeparator as %String;
The character used to separate groups of numeric digits
within the whole number portion of a number formatted by
the $FNUMBER function.
Example: ","
Example: ","
Property methods: NumericGroupSeparatorDisplayToLogical(), NumericGroupSeparatorIsValid(), NumericGroupSeparatorLogicalToDisplay(), NumericGroupSeparatorLogicalToOdbc(), NumericGroupSeparatorNormalize()
property NumericGroupSize as %Integer;
The number of digits in a numeric group formatted by the
$FNUMBER function.
Example: 3
Example: 3
Property methods: NumericGroupSizeDisplayToLogical(), NumericGroupSizeIsValid(), NumericGroupSizeLogicalToDisplay(), NumericGroupSizeNormalize()
property PM as %String;
The suffix which may optionally be appended to time values
at or after 12 noon.
Example: "PM"
Example: "PM"
Property methods: PMDisplayToLogical(), PMIsValid(), PMLogicalToDisplay(), PMLogicalToOdbc(), PMNormalize()
property PlusSign as %String;
The character which may optionally precede or follow a
non-negative numeric quantity formatted by the $FNUMBER
function.
Example: "+"
Example: "+"
Property methods: PlusSignDisplayToLogical(), PlusSignIsValid(), PlusSignLogicalToDisplay(), PlusSignLogicalToOdbc(), PlusSignNormalize()
property TimeFormat as %Integer;
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
Example: 1
Property methods: TimeFormatDisplayToLogical(), TimeFormatIsValid(), TimeFormatLogicalToDisplay(), TimeFormatNormalize()
property TimePrecision as %Integer;
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
Example: 0
Property methods: TimePrecisionDisplayToLogical(), TimePrecisionIsValid(), TimePrecisionLogicalToDisplay(), TimePrecisionNormalize()
property TimeSeparator as %String;
The character used to delimit the hours, minutes and seconds
in a time value.
Example: ":"
Example: ":"
Property methods: TimeSeparatorDisplayToLogical(), TimeSeparatorIsValid(), TimeSeparatorLogicalToDisplay(), TimeSeparatorLogicalToOdbc(), TimeSeparatorNormalize()
property WeekdayAbbr as %String;
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"
Example: " Sun Mon Tue Wed Thu Fri Sat"
Property methods: WeekdayAbbrDisplayToLogical(), WeekdayAbbrIsValid(), WeekdayAbbrLogicalToDisplay(), WeekdayAbbrLogicalToOdbc(), WeekdayAbbrNormalize()
property WeekdayName as %String;
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"
Example: " Sunday Monday Tuesday... Friday Saturday"
Property methods: WeekdayNameDisplayToLogical(), WeekdayNameIsValid(), WeekdayNameLogicalToDisplay(), WeekdayNameLogicalToOdbc(), WeekdayNameNormalize()
property YearOption as %Integer;
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
Example: 0
Property methods: YearOptionDisplayToLogical(), YearOptionIsValid(), YearOptionLogicalToDisplay(), YearOptionNormalize()
Methods
Gets a format item from the current process context
Parameter:
Parameter:
- item - item name (eg: "YEAROPTION", "DATEFORMAT")
Sets a format item in the current process context
Parameters:
Parameters:
- item - item name (eg: "YEAROPTION", "DATEFORMAT")
- val - new value for item
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)
Parameter: (optional)
- new - sets locale format flag to this value (0 or 1)
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- Help()