17.16.4.1 Date and time formatting
- date-and-time-formatting-switch= @ switch-argument ;
A date-and-time-formatting-switch specifies the format of a date or time result. [Note: This switch is sometimes called a picture switch because it allows the use of symbols to represent the format of the field result. end note] If the result of a field is not a date or time, this switch has no effect.
If no date-and-time-formatting-switch is present, a date or time result is formatted in an implementation-defined
manner.
A date and time switch-argument is made up of a series of picture items.
Date Formatting Picture Items
- Picture Item
Description
- aaa
Formats the day of the week or month in an abbreviated form according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions: - If the lang element is ja-JP or ko-KR, display in the corresponding language. - For all other lang element values, display picture item as text.
Multiple instances of the picture item create repeated content.
- A
Formats the day of the month as a number without a leading zero for single-digit days in Japanese numerals.
Multiple instances of the picture item create repeated content.
- bb
Formats the year as a 2-digit number according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions: - If the lang element is zh-TW, zh-CN, zh-HK, zh-SG, or zh-MO, use the Gregorian year [ISO 8601] . - For all other lang element values, use Thai Buddhist Era year
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content unless the pattern contains the “bbbb” picture item. Those portions are formatted following the description outlined for the “bbbb” picture item.
- bbbb
Formats the year as a 4-digit number according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions: - If the lang element is ZH-TW, zh-CN, zh-HK, zh-SG, or zh-MO, use the Gregorian year [ISO 8601] - For all other lang element values, use Thai Buddhist Era year
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content.
- BB
Formats the year as a 2-digit number.
- BBBB
d
dd
ddd
Date Formatting Picture Items
Defaults to the Gregorian [ISO 8601] calendar, but also responds to the \s and \h switches.
Multiple instances of the picture item create repeated content as specified by the following: 3. Working from the text direction of the run, create as many groups as possible that contain “BBBB” in each group. Format each group using the description outlined for the “BBBB” picture item. 4. Repeat step 1 for groups of “BB” using the description for that picture item.
Formats the year as a 4-digit number.
Defaults to the Gregorian calendar [ISO 8601], but also responds to the \s and \h switches.
Multiple instances of the picture item create repeated content as specified by the “BB” picture item description.
Formats the day of the week or day of the month as a number without a leading zero for single-digit days.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb or bbbb picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “dddd” in each group. Format each group using the description outlined for the “dddd” picture item. 2. Repeat step 1 for groups of “ddd”, “dd”, and “d” using the respective description for each picture item group.
Formats the day of the week or day of the month as a number with a leading zero0 for single-digit days.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb or bbbb picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the “d” picture item description.
Formats the day of the week or month in its abbreviated form according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence
Date Formatting Picture Items
dddd
-
D
-
DD
-
DDD
of the \s and \h switches, and the bb, bbbb, ปปปป, ปป, ดดดด, ดดด, ดด, ด, วววว, ววว, วว, and ว picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the “d” picture item description.
Formats the day of the week as its full name according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb, bbbb, ปปปป, ปป, ดดดด, ดดด, ดด, ด, วววว, ววว, วว, and ว picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the “d” picture item description.
Formats the day of the week or day of the month as a number without a leading zero for single-digit days.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb or bbbb picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “DDDD” in each group. Format each group using the description outlined for the “DDDD” picture item. 2. Repeat step 1 for groups of “DDD”, “DD”, and “D” using the respective description for each picture item group.
Formats the day of the month as a two-digit number (with a leading zero for single-digit days).
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb or bbbb picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the “D” picture item description.
Formats the day of the week in an abbreviated form according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb or bbbb, ปปปป, ปป, ดดดด, ดดด, ดด, ด, วววว, ววว, วว, and ว picture item (to the Thai Buddhist Era calendar).
-
DDDD
-
e
-
ee
-
E
-
EE
Date Formatting Picture Items
Multiple instances of the picture item create repeated content as specified by the “D” picture item description.
Formats the day of the week as its full name according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb, bbbb, ปปปป, ปป, ดดดด, ดดด, ดด, ด, วววว, ววว, วว, and ว picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the “D” picture item description.
Formats the Japanese Emperor Era era with no leading zero for single-digit years.
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “ee” in each group. Format each group using the description outlined for the “ee” picture item. 2. Repeat step 1 for groups of “e” using the description for that picture item.
Formats the Japanese Emperor Era era with a leading zero for single-digit years.
Multiple instances of the picture item create repeated content as specified by the “e” picture item description.
Formats the era according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions: - If the lang element is ja-JP, display the Japanese Emperor Era era with no leading zero for single-digit years in the corresponding language. - If the lang element is zh-TW, display the Taiwanese year in the corresponding language. - For all other values, display the Gregorian year [ISO 8601] as a four-digit number using ja-JP.
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “EE” in each group. Format each group using the description outlined for the “EE” picture item. 2. Repeat step 1 for groups of “E” using the description for that picture item.
Formats the Gregorian year [ISO 8601] as a four-digit number, according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions.
Date Formatting Picture Items
-
g
-
gg
-
ggg
If the lang element is ja-JP, zh-TW, zh-CN, zh-HK, zh-SG, or zh-MO display in the corresponding language. For all other lang element values, display in ja-JP.
Multiple instances of the picture item create repeated content as specified by the “E” picture item description.
Formats the era according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions: If the lang element is ko-KR or zh-TW, display nothing. For all other lang element values, display Japanese Emperor Era era as its abbreviated form in en-US.
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “ggg” in each group. Format each group using the description outlined for the “ggg” picture item. 2. From the remaining values, repeat step 1 for groups of “gg” using the description for that picture item. 3. From the remaining values, repeat step 1 for groups of “g” using the description for that picture item.
Formats the era according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions: - If the lang element is ja-JP, display the Japanese Emperor Era era as its abbreviated form in the corresponding language. - If the lang element is ko-KR, display the Korean Tangun era as its full name in the corresponding language. - If the lang element is zh-TW, display the Taiwanese era as its full name in the corresponding language. - For all other lang element values, display the Japanese Emperor Era era as its abbreviated form in ja-JP.
Multiple instances of the picture item create repeated content as specified by the “g” picture item description.
Formats the era according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions: - If the lang element is ja-JP, display the Japanese Emperor Era era as its full name in the corresponding language. - If the lang element is ko-KR, display the Korean Tangun era as its full name in the corresponding language. - If the lang element is zh-TW, display the Taiwanese era as its full name in the corresponding language. - For all other lang element values, display the Japanese Emperor Era era as its full name in ja-JP.
-
G
-
GG
M
MM
Date Formatting Picture Items
Multiple instances of the picture item create repeated content as specified by the “g” picture item description.
Formats the era according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions. - If the lang element is ko-KR or zh-TW, display nothing. - For all other lang element values, display the Japanese Emperor Era era as its abbreviated form in ja-JP.
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “GG” in each group. Format each group using the description outlined for the “GG” picture item. 2. Repeat step 1 for groups of “G” using the description for that picture item.
Formats the era according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions. - If the lang element is ko-KR, display the Korean Tangun era as its full name in the corresponding language. - If the lang element is zh-TW, display the Taiwanese era as its full name in the corresponding language. - For all other lang element values, display the Japanese Emperor Era era as its full name in ja-JP.
Multiple instances of the picture item create repeated content as specified by the “G” picture item description.
Formats the month as a number without a leading zero for single-digit months. Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb or bbbb picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “MMMM” in each group. Format each group using the description outlined for the “MMMM” picture item. 2. Repeat step 1 for groups of “MMM”, “MM”, and “M” using the respective description for each picture item group.
Formats the month as a number with a leading zero for single-digit months.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb or bbbb picture item (to the Thai Buddhist Era calendar).
Date Formatting Picture Items
MMM
MMMM
-
n
-
nn
-
O
-
w
Multiple instances of the picture item create repeated content as specified by the “M” picture item description.
Formats the month in its abbreviated form according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb, bbbb, ปปปป, ปป, ดดดด, ดดด, ดด, ด, วววว, ววว, วว, and ว picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the “M” picture item description.
Formats the month as its full name according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb, bbbb, ปปปป, ปป, ดดดด, ดดด, ดด, ด, วววว, ววว, วว, and ว picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the “M” picture item description.
Formats the Japanese Emperor Era era with no leading zero for single-digit years.
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “nn” in each group. Format each group using the description outlined for the “nn” picture item. 2. Repeat step 1 for groups of “n” using the description for that picture item.
Formats the Japanese Emperor Era era with leading zero for single-digit years.
Multiple instances of the picture item create repeated content as specified by the “n” picture item description.
Formats the month as a number without a leading zero for single-digit months in Japanese numerals.
Multiple instances of the picture item create repeated content.
Formats the day of the week in an abbreviated form according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions: - If the lang element is ja-JP or ko-KR, display in the corresponding language. - For all other lang element values, display picture item as literal text.
-
W
-
y
yy
yyyy
- Y
Date Formatting Picture Items
Multiple instances of the picture item create repeated content.
Formats the day of the week in an abbreviated form according to the language specified by the lang element (17.3.2.20) on the run containing the field instructions: - If the lang element is ja-JP, ko-KR, zh-TW, zh-CN, zh-HK, zh-SG, or zh-MO, display in the corresponding language. - For all other lang element values, display the picture item as literal text.
Multiple instances of the picture item create repeated content.
Formats the year as a 2-digit number.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches.
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “yyyy” in each group. Format each group using the description outlined for the “yyyy” picture item. 2. Repeat step 1 for groups of “yy” and “y” using the respective description for each picture item group.
Formats the year as a 2-digit number.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches.
Multiple instances of the picture item create repeated content as specified by the “y” picture item description.
Formats the year as a 4-digit number.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches.
Multiple instances of the picture item create repeated content as specified by the “y” picture item description.
Formats the year as a 2-digit number.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb, bbbb, ปปปป, and ปป picture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the following:
Date Formatting Picture Items
-
YY
-
YYYY
Working from the text direction of the run, create as many groups as possible that contain “YYYY” in each group. Format each group using the description outlined for the “YYYY” picture item. Repeat step 1 for groups of “YY” and “Y” using the respective description for each picture item group.
Formats the year as a 2-digit number.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb, bbbb, ปปปป, and ปปpicture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the “Y” picture item description.
Formats the year as a 4-digit number.
Defaults to the Gregorian calendar [ISO 8601], but also changes in the presence of the \s and \h switches, and the bb, bbbb, ปปปป, and ปปpicture item (to the Thai Buddhist Era calendar).
Multiple instances of the picture item create repeated content as specified by the “Y” picture item description.
Formats the day of the month as a number without a leading zero for single-digit days in Thai numerals.
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “วววว” in each group. Format each group using the description outlined for the “วววว” picture item. 2. Repeat step 1 for groups of “ววว”, “วว” and “ว” using the respective description for each picture item group.
Formats the day of the month as a two-digit number (with a leading zero for single-digit days) in Thai numerals.
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content as specified by the “ว” picture item description.
Formats the Thai Buddhist Era day of the week in its abbreviated form in Thai.
This picture item can modify the behaviour of other picture items.
Date Formatting Picture Items
Multiple instances of the picture item create repeated content as specified by the “ว” picture item description.
Formats the Thai Buddhist Era day of the week as its full name in Thai.
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content as specified by the “ว” picture item description.
Formats the Thai Buddhist Era month as a number without a leading zero for single-digit months in Thai numerals.
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content as specified by the following: 1. Working from the text direction of the run, create as many groups as possible that contain “ดดดด” in each group. Format each group using the description outlined for the “ดดดด” picture item. 2. Repeat step 1 for groups of “ดดด”, “ดด” and “ด” using the respective description for each picture item group.
Formats the Thai Buddhist Era month as a two-digit number (with a leading zero for single-digit months) in Thai numerals.
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content as specified by the “ด” picture item description.
Formats the Thai Buddhist Era month in its abbreviated form.
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content as specified by the “ด” picture item description.
Formats the Thai Buddhist Era month as its full name.
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content as specified by the “ด” picture item description.
Formats the Gregorian year as a 2-digit number using Thai numerals.
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content as specified by
Date Formatting Picture Items
- Picture Item
Other
character
'text'
`numbered-item`
the following: 1. Working from the text direction of the run, create as many groups as possible that contain “ปปปป” in each group. Format each group using the description outlined for the “ปปปป” picture item. 2. Repeat step 1 for groups of “ปป” using the description for that picture item.
Formats the Gregorian year [ISO 8601] as a 4-digit number using Thai numerals.
This picture item can modify the behaviour of other picture items.
Multiple instances of the picture item create repeated content as specified by the “ปป” picture item description.
Miscellaneous Formatting Picture Items
Description
Includes the specified character in the result at that position. [Note: Commonly used characters are colon (:), hyphen (-), asterisk (*), slash (/), and space. end note]
Includes text in the result.
Includes, in Arabic numerals, the number of the preceding item numbered as a caption or resulting from a SEQ field (17.16.5.56). numbered-item shall be the same name as identifier in that SEQ field.
[Example: When updated in a US-English context on the date and time shown below, the following fields produced these results:
DATE \@ "M/d/yyyy"
DATE \@ "dddd, MMMM dd, yyyy"
DATE \@ "MMMM d, yyyy"
DATE \@ "M/d/yy"
DATE \@ "yyyy-MM-dd"
DATE \@ "d-MMM-yy"
DATE \@ "M.d.yyyy"
DATE \@ "MMM. d, yy"
DATE \@ "d MMMM yyyy"
DATE \@ "MMMM yy"
DATE \@ "MMM-yy"
DATE \@ "M/d/yyyy h:mm am/pm"
DATE \@ "M/d/yyyy h:mm:ss am/pm"
DATE \@ "h:mm am/pm"
DATE \@ "h:mm:ss am/pm"
DATE \@ "HH:mm"
DATE \@ "'Today is 'HH:mm:ss"
end example]