$NLS_DATE_UNIFACE_PARSER
Have Uniface parse specified NLS date formats when numeric input is provided for the day of the month, month, and year. (By default, the parser supplied by the ICU libraries is used.)
Syntax
$NLS_DATE_UNIFACE_PARSER
{=
} {short
}, {medium
}, {long
},
{full
} | {all
}
Arguments
short
,medium
,long
andfull
—$NLS format, in which the locale determines the exact format that is used. Specify one or more formats for which the Uniface parser should be used.all
—use the Uniface parser for all $NLS date formats.
Defaults
Assignment file: | Any application assignment file |
Section: | [SETTINGS] |
Default value: | None |
Description
Note: To ensure consistency between Date and Datetime, the settings $NLS_DATE_UNIFACE_PARSER and $NLS_DATETIME_UNIFACE_PARSER should be always be used together.
NLS formatting is provided by third-party ICU
libraries which support the concept of a short
, medium
,
long
or full
Date. (For examples of these formats, see
http://demo.icu-project.org/icu-bin/locexp?d_=en.)
By default, the parser supplied by the ICU libraries is used to interpret these dates. The ICU parser expects that date and time data to be entered in the correct order, with the correct abbreviation for day or month, and the correct separator. When the input does not meet these requirements, the results can be unpredictable.
In contrast, the Uniface date parser accepts a
number of different separators, including no separator, and allows months to be numerically
specified. For example, if a different separator is used than that specified in the format, a
backslash (/
) instead of hyphen (-
), the rest of the input is
ignored and today's values are used for the unspecified fields.
Note: It is also possible to specify NLS Dates using a
Uniface display format ($NLS(dd/mmm/yy)
), in which case the NLS formats are
already parsed by Uniface. For more information, see $NLS Display Formats for Numeric and Float and $NLS Display Formats for Date and Time.
You can use the $NLS_DATE_UNIFACE_PARSER setting to override the default behavior and have Uniface parse specific NLS date formats. Uniface parsing is only used when numeric input is provided (apart from the separator), and only for the day of the month, month, and year.
Uniface parsing still interprets the input in the
order specified by the ICU format. For example, for English (United States),
en_US
, Uniface interprets the first digits as the Month, whereas for English
(United Kingdom), en_GB
, Uniface interprets the first digits as the Day of the
Month.
Where the format includes the day of the week or the day name, for example, these will be automatically provided in the display.
Using the Uniface Parser for Long and Full Date Formats
[SETTINGS] $NLS_DATE_UNIFACE_PARSER = long, full