XFA Specification
Chapter 23, FormCalc Specification
FormCalc Support for Locale
829
For a specification of how to construct date picture clauses, refer to
“Date Picture Clauses” on page 915
within the
“Picture Clause Specification”.
The following are examples of date picture clauses:
MM/DD/YY
MM/DD/YY
DD.MM.YYYY
DD MMM YYYY
MMMM DD, YYYY
EEEE,' le 'D MMMM, YYYY
Specifically, in the default en_US locale, the
default date picture clause
is the following:
MMM D, YYYY
Date picture clauses are used to format and parse date strings, using the built-in functions
Num2Date()
and
Date2Num()
. All formatting and parsing is strict; when formatting, all literals and punctuations are
included, and when parsing, all literals and punctuations must be matched exactly. If the date picture
clause is meaningless, no formatting nor parsing is attempted.
Localized Date Formats
Properly internationalized e-forms prompt the user with characters appropriate for the locale. Such
localized prompts specify the format in which the user must supply the date, a format that must reflect the
picture clause used for input parsing.
The following table provides examples of the prompts used for various locales, depending on the picture
clause used to parse the user-provided value.
Note:
The prompts used by any locale may change over time. The prompts presented in the following
table are currently typical; however, they may change in future years.
Examples of localized date prompts
Localized date format (a localized prompt)
Picture clause used for input
parsing
English
"YY/MM/DD"
"EEEE, D. MMMM YYYY"
French as used in
Canada
aa-MM-jj
EEEE, j. MMMM aaaa
German as used in
Switzerland
jj/MM/tt
EEEE, t. MMMM jjjj
YY/MM/DD
n/a
FormCalc provides several functions that return or process localized date formats. For example,
LocalDateFmt()
returns a localized date format that might be used to prompt a user to enter a date.
The resulting localized date format uses the date symbols specific for the locale.
Time Format Styles
FormCalc functions support time format styles, which are a locale-independent style of representing time.
Supported date and time styles include short, medium, long, and full. One time style is designated the
Home Index Bookmark Pages
Pages: Home Index All Pages