Date/Time names is required topic to work in Date/Time Patterns.
Certain calendar fields can have both numeric and textual forms. Textual forms are things like months of the year (January, February, etc..) and days of the week (Sunday, Monday, etc..)
The date field names are used in user interfaces on computer systems as labels as shown in this table example, where a user is asked to enter the year, month, and day:
Year | 1942 |
Month | ... |
Day | ... |
The grammatical form should be whatever is typical for such isolated or stand-alone cases: generally it will be nominative singular. The letter casing should be appropriate for middle-of-sentence use, since there is now separate capitalization context data that can specify how these should be capitalized for use in a label. Also see the translation guide on Capitalization.
There are three lengths: full, short, and narrow. They are listed below along with English examples and explanations (a few of the fields are not straightforward).
Field name | English examples for different name widths | Explanation of the field being named, example as a label | ||
---|---|---|---|---|
(full) | -short | -narrow | ||
era | era | era | era | Name of the field that distinguishes different calendar epochs in a calendar, such as CE / BCE for the Gregorian calendar, or 平成 / 昭和 / 大正 for the Japanese calendar. Can be used as a popup menu label, e.g. “Era: CE ▾ ” to select CE for Gregorian calendar. |
year | year | yr. | yr. | Name of the field that designates years. |
quarter | quarter | qtr. | qtr. | Name of the field for a three-month “quarter” often used for reporting financial transactions. Can be used as a popup menu label, e.g. “Quarter: 2 ▾ ” to select the second quarter of the year. |
week | week | wk. | wk. | Name of the field for week number of the year. Can be used as a popup menu label, e.g. “Week: 20 ▾ ” to select the 20th week of the year for an event. |
weekOfMonth | week of month | wk. of mo. | wk. of mo. | Name of the field for the week number in the month. Can be used as a popup menu label, e.g. “Week of month: 3 ▾ ” to select the 3rd week of the month for an event. |
day | day | day | day | Name of the field for the day number in the month. Can be used as a popup menu label, e.g. “Day: 19 ▾ ” to select the 19th day of the month for an event. |
dayOfYear | day of year | day of yr. | day of yr. | Name of the field for the day number in the year. Can be used as a popup menu label, e.g. “Day of year: 139 ▾ ” to select the 139th day of the year for an event. |
weekday | day of the week | day of wk. | day of wk. | Name of the field for the day of the week. Can be used as a popup menu label, e.g. “Day of the Week: Friday ▾ ” to select Friday for an event. |
weekdayOfMonth | weekday of the month | wkday. of mo. | wkday. of mo. | Name of the field specifying the number of the occurrence of a particular weekday within the month. Can be used as a popup menu label, e.g. “Weekday of the month: 3 ▾ ” to select the 3rd Friday of the month for an event, assuming that Friday is specified with a different popup. |
dayperiod | AM/PM | AM/PM | AM/PM | Name of the field that designates range of time within a day. Can be used as a popup menu label, e.g. “AM/PM: morning ▾ ” to select the desired time for a flight departure; different values could be used to select other ranges such as “evening”, “AM” or “PM”, or particular points such as “noon” or “midnight” (The current English name is not necessarily the best example for this). |
hour | hour | hr. | hr. | Name of the field that designates hours. |
minute | minute | min. | min. | Name of the field that designates minutes. |
second | second | sec. | sec. | Name of the field that designates seconds. |
zone | time zone | zone | zone | Name of the field that designates the time zone. Can be used as a popup menu label, e.g. “Time zone: Pacific Time ▾ ” to select Pacific Time; different values could be used to select other time zones, such as “GMT” or “Beijing Time”. |
Era names are in Gregorian Calendar and other calendars:
💡 Translation Tips
In the Gregorian calendar, these designate the four three-month periods often used for financial reporting. The abbreviated or narrow forms may simply be something like “Q2” or “2” respectively. These may not be useful in calendars that do not always have 12 months in a year.
This field is one of the months of the year, such as January or February.
In many languages, it is not common to use abbreviated months. The preferred way to address this is using date/time patterns that never use the abbreviated months MMM or LLL, as explained in Patterns without abbreviated months.
💡 Translation Tips
This field is one of the days of the week: Monday, Tuesday, Wednesday, etc...
Same as month names, you need to use different symbols to coordinate use of standalone (e.g. cccc) and format names (e.g. EEEE) in patterns. See When to use standalone vs. format names in Date/Time patterns.
💡 Translation Tips
AM/PM (special handling for locales using 24 hrs)
Also see Additional Date/time formats.
💡 Translation Tips
The time span associated with each code is different for different languages!
Code | English | German | Russian | |
---|---|---|---|---|
Standalone | morning1 | morning | Morgen | утра |
Formatting | morning1 | in the morning | morgens | утро |
formatting example | morning1 | 10:00 in the morning | 10.00 morgens | 10:00 утра |
The format version will be substituted into a time format, and should contain whatever inflections/prepositions are necessary for that.
DayPeriods are spans of time during the day. There are two forms for each possible period:
The codes may also be used—like plural categories—to select messages based on the day period. For example, an email program might use them to select among messages like: “arrived last night” or “arrived this morning”.
In all of the Span examples below, the times are 24 hour starting at 00:00 (midnight). The span does not actually include the second number of the range. For example, 05:00-08:00 is really 05:00-07:59:59.999...
There are two types of day periods, fixed and locale-specific.
The fixed periods have the same definition in each language. The codes am and pm must always exist, even if your language always uses 24 hour time and doesn‘t use am/pm in any patterns (they are required for testing). So use the best term you can. As long as the 24 hour symbol (H) is used in the patterns, they won’t actually show up in formatted times and dates.
Noon or midnight don‘t have to be present if the precise terms don’t exist in your language. For example, many languages don't have a special term for precisely 12:00 noon. They may have a term for “midday” that spans from (say) 11:00-13:00, but not have unique term for exactly 12:00 noon or a noon hour. Such a language should not have a code for noon show up in the Survey Tool.
In formatting, where your language has a term for midnight, it is used instead of the term for am for the point in time 00:00 (= 24:00) when the pattern uses ‘b’ instead of ‘a’. Similarly, where your language has a term for noon, it is used instead of pm for the point in time 12:00 when the pattern uses ‘b’.
Code | English Examples | Span |
---|---|---|
am | am | 00:00–12:00 (noon) |
pm | pm | 12:00–24:00 |
midnight | midnight | The point in time at 00:00 midnight (to the degree of precision determined by the other fields shown) |
noon | noon | The point in time at precisely 12:00 noon ( to the degree of precision determined by the other fields shown) |
These mark approximate periods in the day, and those periods differ between languages. The codes are arbitrary, and don't have to match the English meaning for your language: the important feature is the time span. The spans are approximate; in reality they may vary with the time of year (they might be dependent on sunrise), or context (someone might say they went to bed at 2 at night, and later one say that they woke up at 2 in the morning).
For a list of the day period IDs defined in CLDR for your language, see Day Periods. If you think the rules are wrong (or missing) for your language, please file a ticket and supply the missing information. Here are examples for English and Chinese.
Code | English | Span | Chinese | Span |
---|---|---|---|---|
morning1 | morning | 06:00–12:00 | 早上 | 05:00-08:00 |
morning2 | unused | 上午 | 08:00-12:00 | |
afternoon1 | afternoon | 12:00–18:00 | 中午 | 12:00-13:00 |
afternoon2 | unused | 下午 | 13:00-19:00 | |
evening1 | evening1 | 18:00-21:00 | 晚上 | 19:00-00:00 |
evening2 | unused | unused | ||
night1 | night | 21:00–06:00 | 凌晨 | 00:00-05:00 |
night2 | unused | unused |
The narrow date fields are the shortest possible names (in terms of width in common fonts), and are not guaranteed to be unique. Think of what you might find on a credit-card-sized wallet or checkbook calendar, such as in English for days of the week:
S M T W T F S
Cyclic Name Sets
Cyclic name sets are used in calendars where naming cycles are used for naming years, months, days, times of day or zodiacs. For example, the Chinese and Hindu calendars each use a 60-name cycle for naming years. Each cyclic name set has standalone and formatting names of varying lengths, similar to months or days.
For lunar calendars that can have months added or removed from the usual set of months in a year, month patterns are used to rename the affected months or the months around them.
Some dates can be specified by giving relative names, such as “this month”, “last month” or “next month”.
For example, if today is Jan 10, then:
Category | English Examples | Meaning |
---|---|---|
next X | next month | Used in a context referring to an event that will occur in the next calendar month (day, etc) next month tomorrow ( next day in English ) next year next Saturday etc.. |
this X | this month, today | Used in a context referring to an event that will occur in the current calendar month (day, etc) this month today ( this day in English ) this year this Saturday etc... |
last X | last month, yesterday | Used in a context referring to an event that occurred in the immediately last month (day, etc). last month yesterday ( next day in English ) last year last Saturday etc... |
in X | in 3 days in 1 week in 3 Sunday | Used in a context referring to an event will occur in X number relative to immediate month (day, etc). in 1 month (see English example ) in 1 week (see English example ) in 3 days (see English example ) in 3 Mondays (see English example ) etc... |
X ago | 4 days ago | Used in a context referring to an event that occurred in X number relative to immediate month (day, etc). 1 month ago (see English example ) 1 week ago (see English example ) 3 days ago (see English example ) 3 Mondays ago (see English example ) etc... |
When listing calendar events, or when emails arrived, an interface may abbreviate dates using relative names.
For example, in the following table of sample emails, the emails up to 2 months ago are listed with explicit dates, while the closer ones use relative dates.
Relative date usage examples:
From | Subject | Date |
---|---|---|
Rick | Re: Meeting in February | 12:15 |
Tom, Sarah,… | Avoiding taxes | Yesterday |
Nicole | Investment opportunities in Germany? | 4 days ago |
Rick | Meeting in February | Last Month |
Jane | New Year's Eve Party! | Dec 12, 2009 |
These relative names can be programmatically capitalized (using the contextTransform data) for different contexts, such as for listing in a menu of column of an interface.
💡 Translation Tips
There are a number of patterns like “the week of {0}” used for constructions such as “the week of April 11, 2016” or “the week of April 11–15”. The placeholder can be a full or partial date. There are related week-of date pattern that it should be as consistent with as possible, described here.
<dateFormatItem id=“MMMMW” count=“one”>‘week’ W ‘of’ MMM</dateFormatItem>