EpochDate values and time values have an associated
origin or epoch, which is a moment in time from which time
begins. Any date value and any time value prior to its epoch is
invalid.
The unit of value for all date functions is the number of days
since the epoch. The unit of value for all time functions is the
number of milliseconds since the epoch.
Designer defines day one for the epoch for all date functions
as Jan 1, 1900, and millisecond one for the epoch for all time functions
is midnight, 00:00:00, Greenwich Mean Time (GMT). This definition
means that negative time values can be returned to users in time
zones east of GMT.
Date formatsA date format is
a shorthand specification of how a date appears. It consists of various
punctuation marks and symbols that represent the formatting that
the date must use. The following table lists examples of date formats.
Date format
|
Example
|
MM/DD/YY
|
11/11/78
|
DD/MM/YY
|
25/07/85
|
MMMM DD, YYYY
|
March 10, 1964
|
The format of dates is governed by an ISO standard. Each country
or region specifies its own date formats. The four general categories
of date formats are short, medium, long, and full. The following
table contains examples of different date formats from different
locales for each of the categories.
Locale identifier and description
|
Date format (Category)
|
Example
|
en_GB
English (United Kingdom)
|
DD/MM/YY (Short)
|
08/12/92
08/04/05
|
fr_CA
French (Canada)
|
YY-MM-DD (Medium)
|
92-08-18
|
de_DE
German (Germany)
|
D. MMMM YYYY (Long)
|
17. Juni 1989
|
fr_FR
French (France)
|
EEEE, ' le ' D MMMM YYYY (Full)
|
Lundi, le 29 Octobre, 1990
|
Time formatsA time format is
a shorthand specification to format a time. It consists of punctuations,
literals, and pattern symbols. The following table lists examples
of time formats.
Time format
|
Example
|
h:MM A
|
7:15 PM
|
HH:MM:SS
|
21:35:26
|
HH:MM:SS 'o''clock' A Z
|
14:20:10 o’clock PM EDT
|
Time formats are governed by an ISO standard. Each nation specifies
the form of its default, short, medium, long, and full-time formats.
The locale identifies the format of times that conform to the standards
of that nation.
The following table contains some examples of different date
formats from different locales for each of the categories.
Locale identifier and description
|
Time format (Category)
|
Example
|
en_GB
English (United Kingdom)
|
HH:MM (Short)
|
14:13
|
fr_CA
French (Canada)
|
HH:MM:SS (Medium)
|
12:15:50
|
de_DE
German (Germany)
|
HH:MM:SS z (Long)
|
14:13:13 -0400
|
fr_FR
French (France)
|
HH ' h ' MM Z (Full)
|
14 h 13 GMT-04:00
|
Date and time picture formatsThe following symbols must
be used to create date and time patterns for date/time fields. Certain
date symbols are only used in Chinese, Japanese, and Korean locales.
These symbols are also specified below.
Note: The comma (,), dash (-), colon (:), slash (/),
period (.), and space ( ) are treated as literal values and can
be included anywhere in a pattern. To include a phrase in a pattern,
delimit the text string with single quotation marks ('). For example, 'Your payment is due no later than' MM-DD-YY can
be specified as the display pattern.
Date symbol
|
Description
|
Formatted value for English (USA) locale
where the locale-sensitive input value is 1/1/08 (which is January
1, 2008)
|
D
|
1 or 2 digit (1-31) day of the month
|
1
|
DD
|
Zero-padded 2 digit (01-31) day of the month
|
01
|
J
|
1, 2, or 3 digit (1-366) day of the year
|
1
|
JJJ
|
Zero-padded, three-digit (001-366) day of
the year
|
001
|
M
|
One- or two-digit (1-12) month of the year
|
1
|
MM
|
Zero-padded, two-digit (01-12) month of
the year
|
01
|
MMM
|
Abbreviated month name
|
Jan
|
MMMM
|
Full month name
|
January
|
E
|
One-digit (1-7) day of the week, where (1=Sunday)
|
3 (because January 1, 2008 is a Tuesday)
|
EEE
|
Abbreviated weekday name
|
Tue (because January 1, 2008 is a Tuesday)
|
EEEE
|
Full weekday name
|
Tuesday (because January 1, 2008 is a Tuesday)
|
YY
|
Two-digit year, where numbers less than
30 are considered to fall after the year 2000 and numbers 30 and higher
are considered to occur before 2000. For example, 00=2000, 29=2029,
30=1930, and 99=1999
|
08
|
YYYY
|
Four-digit year
|
2008
|
G
|
Era name (BC or AD)
|
AD
|
w
|
One-digit (0-5) week of the month, where
week 1 is the earliest set of four contiguous days ending on a Saturday
|
1
|
WW
|
Two-digit (01-53) ISO-8601 week of the year,
where week 1 is the week containing January 4
|
01
|
Several additional date patterns are available for specifying
date patterns in Chinese, Japanese, and Korean locales.
Japanese eras can be represented by several different symbols.
The final four era symbols provide alternative symbols to represent
Japanese eras.
CJK date symbol
|
Description
|
DDD
|
The locale’s ideographic numeric valued
day of the month
|
DDDD
|
The locale’s tens rule ideographic numeric
valued day of the month
|
YYY
|
The locale’s ideographic numeric valued
year
|
YYYYY
|
The locale’s tens rule ideographic numeric
valued year
|
g
|
The locale’s alternate era name. For the
current Japanese era, Heisei, this pattern displays the ASCII letter
H (U+48)
|
gg
|
The locale’s alternate era name. For the
current Japanese era, this pattern displays the ideograph that is
represented by the Unicode symbol (U+5E73)
|
ggg
|
The locale’s alternate era name. For the
current Japanese era, this pattern displays the ideographs that
are represented by the Unicode symbols (U+5E73 U+6210)
|
g
|
The locale’s alternate era name. For the
current Japanese era, this pattern displays the full width letter
H (U+FF28)
|
g g
|
The locale’s alternate era name. For the
current Japanese era, this pattern displays the ideograph that is
represented by the Unicode symbol (U+337B)
|
Time symbol
|
Description
|
Locale-sensitive input value
|
Formatted value for English (USA) locale
|
h
|
One- or two-digit (1-12) hour of the day
(AM/PM)
|
12:08 AM or 2:08 PM
|
12 or 2
|
hh
|
Zero-padded 2 digit (01-12) hour of the
day (AM/PM)
|
12:08 AM or 2:08 PM
|
12 or 02
|
k
|
One- or two-digit (0-11) hour of the day
(AM/PM)
|
12:08 AM or 2:08 PM
|
0 or 2
|
kk
|
Two-digit (00-11) hour of the day (AM/PM)
|
12:08 AM or 2:08 PM
|
00 or 02
|
H
|
One- or two-digit (0-23) hour of the day
|
12:08 AM or 2:08 PM
|
0 or 14
|
HH
|
Zero-padded, two-digit (00-23) hour of the
day
|
12:08 AM or 2:08 PM
|
00 or 14
|
K
|
One- or two-digit (1-24) hour of the day
|
12:08 AM or 2:08 PM
|
24 or 14
|
KK
|
Zero-padded, two-digit (01-24) hour of the
day
|
12:08 AM or 2:08 PM
|
24 or 14
|
M
|
One- or two-digit (0-59) minute of the hour
Note: You must use this symbol with an hour symbol.
|
2:08 PM
|
8
|
MM
|
Zero-padded, two-digit (00-59) minute of
the hour
Note: You must use this symbol with
an hour symbol.
|
2:08 PM
|
08
|
S
|
One- or two-digit (0-59) second of the minute
Note: You must use this symbol with an hour and minute
symbol.
|
2:08:09 PM
|
9
|
SS
|
Zero-padded, two-digit (00-59) second of
the minute
Note: You must use this symbol with
an hour and minute symbol.
|
2:08:09 PM
|
09
|
FFF
|
Three- digit (000-999) thousandth of the
second
Note: You must use this symbol with an hour,
minute, and seconds symbol.
|
2:08:09 PM
|
09
|
A
|
The part of the day that is from midnight
to noon (AM) or from noon to midnight (PM)
|
2:08:09 PM
|
PM
|
z
|
ISO-8601 time-zone format (for example, Z, +0500,
-0030, -01, +0100)
Note: You must use this symbol
with an hour symbol.
|
2:08:09 PM
|
-0400
|
zz
|
Alternative ISO-8601 time-zone format (for
example, Z, +05:00, -00:30, -01, +01:00)
Note: You must use this symbol with an hour symbol.
|
2:08:09 PM
|
-04:00
|
Z
|
Abbreviated time-zone name (for example,
GMT, GMT+05:00, GMT-00:30, EST, PDT)
Note: You
must use this symbol with an hour symbol.
|
2:08:09 PM
|
EDT
|
Reserved symbolsThe following symbols have special meanings and
cannot be used as literal text.
Symbol
|
Description
|
?
|
When submitted, the symbol matches any one
character. When merged for display, it becomes a space.
|
*
|
When submitted, the symbol matches 0 or
Unicode white space characters. When merged for display, it becomes
a space.
|
+
|
When submitted, the symbol matches one or
more Unicode white space characters. When merged for display, it
becomes a space.
|
LocalesA locale is
a standard term used when developing international standards to identify
a particular nation (language, country or region). For the purposes
of FormCalc, a locale defines the format of dates, times,
numeric, and currency values relevant to a specific nation or region
so that users can use the formats they are accustomed to.
Each locale is comprised of a unique string of characters called
a locale identifier. The composition of these strings is
controlled by the international standards organization (ISO) Internet
Engineering Task Force (IETF), a working group of the Internet Society
(www.isoc.org).
Locale identifiers consist of a language part, a country or region
part, or both. The following table lists valid locales for this
release of Designer.
Language
|
Country or Region
|
ISO Code
|
Arabic
|
Algeria
|
ar_DZ
|
Arabic
|
Bahrain
|
ar_BH
|
Arabic
|
Egypt
|
ar_EG
|
Arabic
|
Iraq
|
ar_IQ
|
Arabic
|
Jordan
|
ar_JO
|
Arabic
|
Kuwait
|
ar_KW
|
Arabic
|
Lebanon
|
ar_LB
|
Arabic
|
Libya
|
ar_LY
|
Arabic
|
Morocco
|
ar_MA
|
Arabic
|
Oman
|
ar_OM
|
Arabic
|
Qatar
|
ar_QA
|
Arabic
|
Saudi Arabia
|
ar_SA
|
Arabic
|
Sudan
|
ar_SD
|
Arabic
|
Syria
|
ar_SY
|
Arabic
|
Tunisia
|
ar_TN
|
Arabic
|
United Arabian Emirates
|
ar_AE
|
Arabic
|
Yemen
|
ar_YE
|
Armenian
|
Armenia
|
hy_AM
|
Azerbaijani-Cyrillic
|
Azerbaijan
|
az_Cyrl_AZ
|
Azerbaijani-Latin
|
Azerbaijan
|
az_Latn_AZ
|
Basque
|
Spain
|
eu_ES
|
Bosnain
|
Bosnia and Herzegovina
|
bs_BA
|
Bulgarian
|
Bulgaria
|
bg_BG
|
Catalan
|
Spain
|
ca_ES
|
Chinese
|
People’s Republic of China (Simplified)
|
zh_CN
|
Chinese
|
Hong Kong S.A.R., China
|
zh_HK
|
Chinese
|
Taiwan (Traditional)
|
zh_TW
|
Croatian
|
Croatia
|
hr_HR
|
Czech
|
Czech Republic
|
cs_CZ
|
Danish
|
Denmark
|
da_DK
|
Dutch
|
Belgium
|
nl_BE
|
Dutch
|
Netherlands
|
nl_NL
|
English
|
Australia
|
en_AU
|
English
|
Belgium
|
en_BE
|
English
|
Canada
|
en_CA
|
English
|
Hong Kong S.A.R., China
|
en_HK
|
English
|
India
|
en_IN
|
English
|
Ireland
|
en_IE
|
English
|
New Zealand
|
en_NZ
|
English
|
Philippines
|
en_PH
|
English
|
Singapore
|
en_SG
|
English
|
South Africa
|
en_ZA
|
English
|
United Kingdom
|
en_GB
|
English
|
United Kingdom Euro
|
en_GB_EURO
|
English
|
United States of America
|
en_US
|
English
|
U.S. Virgin Islands
|
en_VI
|
Estonian
|
Estonia
|
et_EE
|
Finnish
|
Finland
|
fi_FI
|
French
|
Belgium
|
fr_BE
|
French
|
Canada
|
fr_CA
|
French
|
France
|
fr_FR
|
French
|
Luxembourg
|
fr_LU
|
French
|
Switzerland
|
fr_CH
|
German
|
Austria
|
de_AT
|
German
|
Germany
|
de_DE
|
German
|
Luxembourg
|
de_LU
|
German
|
Switzerland
|
de_CH
|
Greek
|
Greece
|
el_GR
|
Hebrew
|
Israel
|
he_IL
|
Hungarian
|
Hungary
|
hu_HU
|
Indonesian
|
Indonesia
|
id_ID
|
Italian
|
Italy
|
it_IT
|
Italian
|
Switzerland
|
it_CH
|
Japanese
|
Japan
|
ja_JP
|
Kazakh
|
Kazakhstan
|
kk_KZ
|
Khmer
|
Cambodia
|
km_KH
|
Korean
|
Korea
|
ko_KR
|
Korean
|
Korea Hanja
|
ko_KR_HANI
|
Lao
|
Laos
|
lo_LA
|
Latvian
|
Latvia
|
lv_LV
|
Lithuanian
|
Lithuania
|
lt_LT
|
Malay
|
Malaysia
|
ms_MY
|
Norwegian - Bokmal
|
Norway
|
nb_NO
|
Norwegian - Nynorsk
|
Norway
|
nn_NO
|
Persian
|
Iran
|
fa_IR
|
Polish
|
Poland
|
pl_PL
|
Portuguese
|
Brazil
|
pt_BR
|
Portuguese
|
Portugal
|
pt_PT
|
Romanian
|
Romania
|
ro_RO
|
Russian
|
Russia
|
ru_RU
|
Serbian-Cyrillic
|
Serbia and Montenegro
|
sr_Cyrl_CS
|
Serbian-Latin
|
Serbia and Montenegro
|
sr_Latn_CS
|
Slovak
|
Slovakia
|
sk_SK
|
Slovenian
|
Slovenia
|
sl_SI
|
Spanish
|
Argentina
|
es_AR
|
Spanish
|
Bolivia
|
es_BO
|
Spanish
|
Chile
|
es_CL
|
Spanish
|
Columbia
|
es_CO
|
Spanish
|
Costa Rica
|
es_CR
|
Spanish
|
Dominican Republic
|
es_DO
|
Spanish
|
Ecuador
|
es_EC
|
Spanish
|
El Salvador
|
es_SV
|
Spanish
|
Guatemala
|
es_GT
|
Spanish
|
Honduras
|
es_HN
|
Spanish
|
Mexico
|
es_MX
|
Spanish
|
Nicaragua
|
es_NI
|
Spanish
|
Panama
|
es_PA
|
Spanish
|
Paraguay
|
es_PY
|
Spanish
|
Peru
|
es_PE
|
Spanish
|
Puerto Rico
|
es_PR
|
Spanish
|
Spain
|
es_ES
|
Spanish
|
United States of America
|
es_US
|
Spanish
|
Uruguay
|
es_UY
|
Spanish
|
Venezuela
|
es_VE
|
Swedish
|
Sweden
|
sv_SE
|
Tagalog
|
Philippines
|
tl_PH
|
Thai
|
Thailand
|
th_TH
|
Thai
|
Thailand Traditional
|
th_TH_TH
|
Turkish
|
Turkey
|
tr_TR
|
Ukrainian
|
Ukraine
|
uk_UA
|
Vietnamese
|
Vietnam
|
vi_VN
|
Usually, both elements of a locale are important. For example,
the names of weekdays and months, in English, for Canada and Great
Britain are formatted identically, but dates are formatted differently.
Therefore, specifying an English language locale is insufficient.
Also, specifying only a country as the locale is insufficient. For
example, Canada has different date formats for English and French.
In general, every application operates in
an environment where a locale is present. This locale is known as
the ambient locale. In some circumstances, an application
might operate on a system, or within an environment, where a locale is
not present. In these rare cases, the ambient locale is set to a
default of English United States (en_US). This locale is known as
a default locale.
|
|
|