diff --git a/docs/site/TEMP-TEXT-FILES/date-time-names.txt b/docs/site/TEMP-TEXT-FILES/date-time-names.txt index 5f80eddcd03..0f0e2a13b12 100644 --- a/docs/site/TEMP-TEXT-FILES/date-time-names.txt +++ b/docs/site/TEMP-TEXT-FILES/date-time-names.txt @@ -13,15 +13,28 @@ Capitalization should follow the middle of a sentence rule. For more information data can specify the capitalization for other contexts; currently this is not available in the Survey Tool, so you must file a CLDR JIRA ticket to request a change. Most sets of names form Logical Groups, and you need to make sure they have the same contribution status (e.g. Status: Approved) or you will get error messages. See Logical Groups for more information. Date Field Names -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 -Month -Day -1942 -... -... +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”. Eras Era names are in Gregorian Calendar and other calendars: There are only two values for an era in a Gregorian calendar. @@ -72,6 +85,10 @@ You should see something like the following: It shows the time span (with a 24 hour clock) for the code, and then an example (for the format codes). You can also go to the web page Day Periods, and look for your language. For example, for Malayalam, you would go to ...day_periods.html#ml , and see that morning2 is the period that extends from 06:00 to 12:00. +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. For example: DayPeriods are spans of time during the day. There are two forms for each possible period: @@ -84,9 +101,23 @@ Fixed Periods 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) Locale-Specific Periods 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 Narrow Date Fields 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 @@ -101,9 +132,46 @@ For example, if today is Jan 10, then: When this month is used, it would be referring to January. When last month is used, it would be referring to December. When next month is used, it would be referring to February. +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 is a difference between unit patterns (see Plurals) such as "1 year ago" and relative names such as "Last Year". diff --git a/docs/site/TEMP-TEXT-FILES/date-time-patterns.txt b/docs/site/TEMP-TEXT-FILES/date-time-patterns.txt index a9ae096879a..00f72be4d7a 100644 --- a/docs/site/TEMP-TEXT-FILES/date-time-patterns.txt +++ b/docs/site/TEMP-TEXT-FILES/date-time-patterns.txt @@ -9,6 +9,8 @@ There are two types of substrings that are combined in a pattern: Date/time fields, which are placeholders that represent particular calendar values such as month, weekday, year, etc.. "Literal" strings used as-is. These are necessary to make the pattern flow naturally in a given language. For example: +Skeleton format English Pattern English Example Japanese Pattern Japanese Example +yMMMd MMM e, y Dec 5, 2010 y年M月d 日 2010年12月5日 There are three aspects to patterns: A letter in the set {a-z; A-Z} indicates the type of calendar field: See Date/Time Symbols. For example: @@ -18,7 +20,7 @@ y for year The number of letters indicate the form of the names to be used. Example use for month would be: Numeric representation: M or MM for 9 or 09, with leading 0. This is intended to be used in conjunction with a day number; thus, 9/12 or 09/12 -Abbreviated form: MMM  for Sep +Abbreviated form: MMM for Sep Full form: MMMM for September Narrow form: MMMMM (S) When formatting a particular date, non-numeric values (e.g. month names from Gregorian calendar) are substituted into the appropriate pattern substrings using the Date Format Symbols. @@ -31,8 +33,8 @@ The "literal" text in the date-time pattern are used as-is when formatting, and To demonstrate how this work with examples, see the spec Date Format Pattern Examples. 💡 Translation Tips For "literal" text that should be included in patterns, enclose it in single straight quotes if it includes letters A-Za-z or a single straight quote. For example, to include "o'clock" in a long time pattern (hh 'o''clock' a, zzzz). If you need to include the single straight quote itself in literal text, you can do that by doubling it as in the previous example. -In order to provide the correct date and time patterns for your language, you may need to reorder the symbols.  For example, you would need to reorder the U.S. date pattern d/M/y to MM/dd/y if your locale puts the month first in short date patterns. -For bidi scripts (e.g. Arabic and Hebrew), you may need to add directionality markers (U+200E ( LEFT-TO-RIGHT MARK, U+200F RIGHT-TO-LEFT MARK, U+061C ARABIC LETTER MARK). Typically these are most commonly needed in short (numeric) dates, usually before separators such as  '/' or '-'. +In order to provide the correct date and time patterns for your language, you may need to reorder the symbols. For example, you would need to reorder the U.S. date pattern d/M/y to MM/dd/y if your locale puts the month first in short date patterns. +For bidi scripts (e.g. Arabic and Hebrew), you may need to add directionality markers (U+200E ( LEFT-TO-RIGHT MARK, U+200F RIGHT-TO-LEFT MARK, U+061C ARABIC LETTER MARK). Typically these are most commonly needed in short (numeric) dates, usually before separators such as '/' or '-'. For date formats in bidi scripts, the Survey Tool shows examples in both a right-to-left context and a neutral context. In the future it may show examples in a left-to-right contex as well. The hightest priority is to make the formats look correct in a right-to-left context; the next most important is to make them look correct in a a neutral cotext. If possible it is also a good idea to make them work in a left-to-right context. Always look at examples! Examples are in the Information Pane or hover over. When working with date and time formats, there are many substitution and dependencies to different calendar; therefore, the example are best representation to validate your intention on the end result. @@ -44,6 +46,11 @@ Using the month names as examples: format style: Use formatting-style month names represented with "M" when month names is displayed with a day-of-the-month number (e.g. d MMMM y: 5 Monday January 1999). stand-alone style: Use the stand-alone month names represented with "L" when the month name is without a day-of-the month. (e.g. LLLL y: Monday 1999) Following are examples of differences and implications based on language: +wide format months (Use pattern: MMMM) wide stand-alone months Use pattern: LLLL) pattern for full date, e.g.in e-mail log: “d. MMMM y”; thus, intended to use the format style names as examples below. pattern for month + year, e.g. in calendar: “LLLL y”; thus intended to use the stand-alone names as examples below: pattern for month name by itself, e.g. in menu: “LLLL” ; thus, intended to use the stand-alone names as examples below: +7 heinäkuuta heinäkuu 5. heinäkuuta 2018 heinäkuu 2018 heinäkuu +8 elokuuta elokuu 10. elokuuta 2018 elokuu 2018 elokuu +9 syyskuuta syyskuu 15. syyskuuta 2018 syyskuu 2018 syyskuu +10 lokakuuta lokakuu 20. lokakuuta 2018 lokakuu 2018 lokakuu Some language (e.g. Catalan) use a preposition to combine the month and day number, e.g. “11 de setembre” (11 of September). If the month name begins with a vowel, the preposition is contracted, e.g. “12 d’octubre”. For these languages: The format month names should include the preposition in its correct form (contracted or not) @@ -51,6 +58,16 @@ And the stand-alone month names should NOT include the preposition And the patterns using the stand-alone should not include the preposition for month In some languages, the weekday name format forms (e.g. EEEE) and stand-alone forms (e.g. cccc) forms may also differ, and may require similar coordination between names and patterns. Below examples are with month names. +wide format months Use pattern (MMMM) wide stand-alone months Use pattern (LLLL) pattern for full date, e.g.in e-mail log: “d MMMM 'de' y”; thus, intended to use the format style names as examples below: pattern for month + year, e.g. in calendar: “ LLLL 'de' y”; thus intended to use the stand-alone names as examples below: pattern for month name by itself, e.g. in menu: “ LLLL ”; thus, intended to use the stand-alone names as examples below: +7 de juliol juliol 5 de juliol de 2018 juliol de 2018 juliol +8 d’agost agost 10 d’agost de 2018 agost de 2018 agost +9 de setembre setembre 15 de setembre de 2018 setembre de 2018 setembre +10 d’octubre octubre 20 d’octubre de 2018 octubre de 2018 octubre +Format String Date Result +LLLL 2008-1-14 gener +2008-4-14 abril +d MMMM 'de' y 2008-1-14 14 de gener de 2008 +2008-4-14 14 d’abril de 2008 💡 Translation Tips When working with patterns, look at the examples in the right information pane to validate your intention between the name and the pattern. In order to get the right formats for your language, you may need to change the ordering of the Date/Time Symbols, and change the text around them. @@ -58,7 +75,7 @@ You must match the names that should be used in patterns with intended forms of For example: If you specify the time format "h:mm a", by using "a" your intention is to use the Abbreviated formatting name for AM/PM; thus, the end result being 2:37 PM. If you specify the time format "h:mm aaaaa", by using "aaaaa", your intention is to use the Narrow formatting name for AM/PM; thus, the end result being 2:37 p. -Understand the difference between formatting and standalone date and time names in your language and its intended usage in patterns.  For example, if you are working in Catalan (a locale that uses prepositions in formatting month names), and you provide “setembre” for the formatting month name instead of “de setembre,” then the pattern d MMMM will display as “12 septembre” instead of the correct pattern “12 de setembre. +Understand the difference between formatting and standalone date and time names in your language and its intended usage in patterns. For example, if you are working in Catalan (a locale that uses prepositions in formatting month names), and you provide “setembre” for the formatting month name instead of “de setembre,” then the pattern d MMMM will display as “12 septembre” instead of the correct pattern “12 de setembre. Some languages (e.g. Finnish and many Slavic languages) use a month name in nominative case when it is displayed without a day number, and use a different case (genitive, partitive, etc.) when the month is displayed with a day number. For these languages: The stand-alone month names should be in nominative case, And the format month names should be in genitive or a related case. @@ -83,12 +100,25 @@ a, b, and B are same as usage in 12 hour formats, but are not normally used with If a non-default country/region use a different time format than the default country/region for the language, then this difference should be added for the sub-locale. Also see Regional variants. For example, if es (= es_ES, Spanish as used in Spain) uses 24-hour time formats, but es_US (Spanish as used in United States) uses 12 hour time formats, then es would use "HH:mm/H:mm" and es_US would use the "h" formats as described above. . 💡 Translation Tips -Languages should always have translations for AM/PM/noon even if every country/region that the language is used in has 24 hour time.  Many computing systems provide the flexibility for users to specify either 12 or 24 hour time setting on their system (also known as User preference overrides). This is why CLDR provide the flexible formats for both 12 and 24 hour systems. +Languages should always have translations for AM/PM/noon even if every country/region that the language is used in has 24 hour time. Many computing systems provide the flexibility for users to specify either 12 or 24 hour time setting on their system (also known as User preference overrides). This is why CLDR provide the flexible formats for both 12 and 24 hour systems. Basic Date Formats The standard Date formats include four basic formats. See Survey Tool Formats-Standard-Date formats. (Note that the Month symbol especially may vary (M vs MM, or MMM vs LLL). For more information, see Date/Time Symbols.) +Form Include English pattern examples +Full long-weekday (EEEE), year (y), long-month (MMMM), day In some non-Gregorian calendars, it will also contain G representing the era name, such as "AH" or "Heisei" (i.e. "平成"). For some languages, long months are not used; for example, in Japanese the numeric month is used in patterns, in front of the character 月. EEEE, MMMM d, y (e.g. "Tuesday, September 14, 1999") +Long year (y), long-month (MMMM), day (d). MMMM d, y (e.g. "September 14, 1999".) +Medium year (y), abbreviated-month (MMM), day (d). For languages that do not use abbreviated months , use the numeric month (MM/M). For example, "y/MM/dd" , corresponding to a date like "1999/09/14". MMM d, y (e.g. "Sep 14, 1999".) +Short year, numeric-month (MM/M), and day. M/d/yy (e.g. "9/14/99") Additional Date-Time Formats The basic formats as described in above sections provide a small subset of the combinations. To expand to fully cover all variations of date and time formats, a skeleton format is provided that uses the Date/Time Symbols (without order or punctuation) to indicate what fields are desired. An example usage of the flexible formats would be: a software program only needs the year and month information, the flexible pattern yMMM would be used to provide the desired year and month formatting as shown in the English and Japanese examples in this table. +Skeleton English Pattern English Example Japanese Pattern Japanese Example +yMMM MMM y Dec 2010 y年M月 2010年12月 +Skeleton Hypothetical English case For ja@calendar=chinese +Pattern Example +supplied MMMEd E MMM d Tue Apr 18 MMMd日(E) 四月18日(火) +inferred 1 MMMMEd E MMMM d Tue April 18 MMMMd日(E) 四月18日(火) +inferred 2 MMMEEEEd EEEE MMM d Tuesday Apr 18 [incorrect] MMMd日(EEEE) 四月18日(火 曜日) [incorrect] +inferred 3 MMMMEEEEd EEEE MMMM d Tuesday April 18 [incorrect] MMMMd日(EEEE) 四月18日(火曜日) [incorrect] Standalone vs. Formatting in Flexible formats In languages that distinguish between nominative and genitive (or related form such as partitive), the use of symbols in flexible formats also specify the use of nominative forms or genitive (or related) forms of month and day names. month names when day is not included (e.g. skeleton: yMMM) @@ -97,19 +127,25 @@ Use the symbol "LLL" or "LLLL" in the patter, therefore, "LLLLy" month names when day is included (e.g. skeleton: MMMd) Specify the genitive form (or a related form such as partitive) in format month names Use the symbol "MMM" or "MMMM"; therefore resulting in "d MMMM" -day names may also vary for your language depending on the elements included in the pattern (e.g.  skeleton E for day only, or skeleton MEd for month, day, and numeric day) +day names may also vary for your language depending on the elements included in the pattern (e.g. skeleton E for day only, or skeleton MEd for month, day, and numeric day) Use symbols "ccc" or "cccc" in patterns to use the standalone name -Use the symbol  "E" or "EEEE" to use the format name +Use the symbol "E" or "EEEE" to use the format name To understand which pattern characters are used for standalone forms (nominative) versus format forms (genitive or related, such as partitive), see Stand-Alone vs Format Styles, see also the discussion above in Synchronizing Date/Time Names and Patterns. Supplied vs. Inferred patterns Some patterns supplied for each skeleton may be extended from the abbreviated form to an inferred full form by developers who use CLDR. Some Inferred patterns usage are incorrect, instead use the most closely associated skeletons that are available. Build on a chain of fallback options based on available patterns is a good practice. Example expansions: +supplied MMMEEEEd EEEE, MMM d Tuesday, Apr 18 [correct] MMMd日EEEE 四月18日火曜日 [correct] +inferred 4 MMMMEEEEd EEEE, MMMM d Tuesday, April 18 [correct] MMMMd日EEEE 四月18日火曜日 [correct] The correctness of inferred from abbreviated the full will differ by locale. In the examples above table, Inferred 2 and Inferred 3 examples are incorrect, because: English examples are incorrect, because you'd want a comma after the full day name EEEE (Tuesday, Apr 18). Japanese examples are incorrect, because the full day name should not be in parenthesis. Some languages do not use abbreviated months; therefore, a skeleton containing abbreviated month MMM is mapped to a pattern that uses numeric month M or MM. For example, skeleton yMMMd may be supplied with the numeric month d.M.y. +Skeleton Pattern Example +supplied yMMMd d.M.y 18.4.2015 +supplied yMMMMd d. MMMM y 18. huhtikuuta 2015 +without the second entry, would have: inferred yMMMMd d.M.y 18.4.2015 💡 Translation Tips In the Survey tool, the skeleton formats are under Formats-Flexible-Date formats and Formats-Flexible-12/24 Time formats. The skeletons are listed in the Code column in Survey Tool. @@ -120,8 +156,28 @@ Follow the patterns in the survey tool and use the examples to understand the sk : If your language has different grammatical forms for date symbols such as month and day names, the nominative forms of the names should be in the Survey Tool section marked "Standalone", and the genitive or related forms should be in the Survey Tool section marked "Formatting". Day period patterns There are three pattern characters that can you can use to indicate the day period marker in 12-hour-cycle time formats: +Symbol Meaning English example +a (abbreviated) aaaa (full) aaaaa (narrow) AM and PM 12:00 AM, 10:00 AM, 12:00 PM, 7:00 PM +b (abbreviated) bbbb (full) bbbbb (narrow) AM, PM, noon and midnight, 10:00 AM, 12:00 noon, 7:00 PM +B (abbreviated) BBBB (full) BBBBB (narrow) day periods with locale-specific ranges. If a locale does not have data for such day period ranges, this is equivalent to 'b'. 2:00 at night, 10:00 in the morning, 12:00 in the afternoon, 7:00 in the evening. With skeletons (listed in the Code column in Survey Tool) that specify 'h' but no day period, the corresponding patterns are specified with a day period, normally 'a' or 'b'. The patterns can be used to infer how to handle a request for a different day period. For example: +Code English pattern (example) +supplied hm h:mm a +inferred ahm h:mm a +inferred aaaahm h:mm aaaa +inferred bhm h:mm b +inferred bbbbhm h:mm bbbb +inferred* Bhm h:mm B [*see notes below] +inferred* BBBBhm h:mm BBBB [*see notes below] Beginning in CLDR 32, there are 5 additional time patterns that indicate how times should be formatted using day period ranges 'B'. This allows locales to have formats for day period ranges that can display the range symbol in a different position than might be used for symbols for AM, PM, noon, or midnight: +Code English pattern (example) +supplied Bh B h +supplied Bhm B h:mm +supplied Bhms B h:mm:ss +supplied EBhm B h:mm, E +supplied EBhms B h:mm:ss, E +inferred BBBBhm BBBB h:mm +inferred ... ... These new patterns are available in Gregorian and Generic calendars, In these new fields, provide locale data by: 💡 Translation Tips Examples in the Survey Tool show some day periods for the locale as shown in this screenshot below. If the examples for day period ranges show them in the wrong position, then the time formats specific to using day period ranges may be updated. @@ -142,16 +198,35 @@ The “-atTime” variant, which specifies a date at a particular time, typicall The standard variant, which is used for multuple purposes and typically does not include any literal text, for example “{1}, {0}”. Usage examples include: Wall clock time: “Sunday, September 25, 1:30 PM” Combining a date with a time range: “Sunday, September 25, 1:30 – 3:00 PM” -Before CLDR 42, there was only one variant for these. In English that variant used the “-atTime” style, as did many other locales. For CLDR 42, that  “-⁠atTime” data has been moved to the “-⁠atTime” variants, and the standard data has initially been extrapolated from the mediu or short formats without literal text. However, it needs to be checked. +Before CLDR 42, there was only one variant for these. In English that variant used the “-atTime” style, as did many other locales. For CLDR 42, that “-⁠atTime” data has been moved to the “-⁠atTime” variants, and the standard data has initially been extrapolated from the mediu or short formats without literal text. However, it needs to be checked. The determination of which to use by developers using CLDR data is normally based on the date style, for example: If the date has a full month and weekday name, use the full combining pattern. If the date has numeric month, use the short version of the combining pattern. Following are examples on how the data can be different by locale with different combinations of format length. (note: {1}=date format with {0}= time format) Another way to look at the example with original patterns and combined result: +Pattern English German Japanese +Full {1} 'at' {0} +{Full form of the date format} at {full form of the time format} {1} 'at' {0} +Sunday, September 5, 1999 at 1:25:59 PM Eastern Standard Time {1} 'um' {0} +Sonntag, 5. September 1999 um 13:25:59 Nordamerikanische Ostküsten-Normalzeit {1} {0} +1999年9月5日日曜日 13時25分59秒 アメリカ東部標準時 +Medium {1}, {0} +{medium form of the date format}, {medium form of the time format} +Notice the comma and space between the date portion and the time portion. {1}, {0} +Sep 5, 1999, 1:25:59 PM {1}, {0} Result: 05.09.1999, 13:25:59 {1} {0} +1999/09/05 13:25:59 +date pattern time pattern date-time combining pattern used formatted example +MMMM d, y h:mm a [long] {1} 'at' {0} September 14, 1999 at 1:25 PM +M/d/yy h:mm a [short] {1}, {0} 9/14/99, 1:25 PM +Survey Tool field English pattern Pattern characters +yw-one 'week' w 'of' Y (example: Week 37 of 2009) w designates the number of the week within a year calculated for week-of year purposes and indicated using the pattern character Y (instead of the normal year designator y). The year indicated by Y typically begins on the locale’s first day of the week and ends on the last day of the week, so its transitions may differ by a few days from the standard year indicated by y. +yw-other 'week' w 'of' Y +MMMMW-one 'week' W 'of' MMMM (example: Week 3 of April) W designates the number of the week within the month +MMMMW-other 'week' W 'of' MMMM Week-Of Patterns The week-of date patterns were introduced in CLDR 30 for enumerating week count in larger periods, e.g. “week 15 of 2016” or “week 4 of April”. The Survey Tool fields and corresponding English entries are shown below: For developers who use CLDR data, -The pattern can be selected based on the plural form associated with the week number, in case the form depends on the number.  (either -one or -other) +The pattern can be selected based on the plural form associated with the week number, in case the form depends on the number. (either -one or -other) Currently these patterns only support cardinal numbers; in the future they may be extended to support ordinal numbers for usages such as “2nd week of April”. In this case the distinction by plural form associated with week number may become more relevant. 💡 Translation Tips If your language has a grammatical difference in the month names(aside from just the simple addition of a prefix or suffix), localizers will need to use a work-around construction (file a ticket if this is the case for your language). @@ -167,12 +242,19 @@ Date/Time Intervals Interval patterns contain a start pattern and an end pattern (using the Date/Time Symbols). They are used for a range of dates or times, such as "Sept 10–12" (meaning the 10th of September through the 12th of September). The interval format is used where it is necessary to make the pattern as short as possible, and elide information that does not have to be repeated. For example, the pattern used to get "Sept 10–12" in English is "MMM d–d". Unlike simple Date/Time Patterns, these consist of two parts, typically separated by with some kind of punctuation mark (e.g. English uses en-dash " – "). Also, some fields in the second part are omitted (e.g. "d – d MMM" omits repeat of MMM for the second part). The first field that comes from the second date is marked with red in the examples below. Interval Formatting +Format Pattern Date 1 Date 2 Result +MMM d– d 2008-09-13 2008-09-15 Sept 13–15 +MMMM– MMMM , yyyy 2008-09-01 2008-11-31 September–November, 2008 Greatest Difference Each combination of fields can be used with dates that differ by different amounts. For example, a format for the fields "yMMMd" (year, abbreviated month, and day) could be used with two dates that differ by year, month, or day. As the examples below indicate, for a given skeleton, each type of difference might need a different pattern. For example, when the greatest difference is a year, no part of the second pattern is omitted; when the greatest difference is a month, then the year is not repeated, since it would be the same for each pattern. +Date 1 Date 2 Greatest Difference Format Pattern Shares +2008-09-13 2009 -09-15 year (yMd) MMM d, yyyy – MMM d, yyyy nothing +2008-09-01 2008- 11 -31 month (Md) MMM d – MMM d, yyyy year +2008-09-01 2008-09- 05 day (d) MMM d– d , yyyy year and month Different Calendars Date and Time patterns are also available for other calendars in addition to the Gregorian calendar. For example, the Buddhist, Islamic, Hebrew, or Japanese calendars. Different calendars work with the data in Gregorian, and Generic in the following ways: diff --git a/docs/site/TEMP-TEXT-FILES/date-time-symbols.txt b/docs/site/TEMP-TEXT-FILES/date-time-symbols.txt index b6f9efef7e9..1f39a5fe536 100644 --- a/docs/site/TEMP-TEXT-FILES/date-time-symbols.txt +++ b/docs/site/TEMP-TEXT-FILES/date-time-symbols.txt @@ -6,10 +6,52 @@ Dates and times are formatted using patterns, like "mm-dd". Within these pattern When the software formats a date for your language, a value will be substituted for each field, according to the following table. Examples of the pattern usage you may see in an every day use may be on the lock screen on a mobile device showing the date or time, or as a date stamp on an email. Notice in the table below that there are different pattern characters for standalone and formatting. For example M to indicate the formatting and L to indicate the standalone month names. Make sure you understand the difference between standalone and formatting patterns and use the appropriate symbols in patterns. See when to use standalone vs. formatting in Date and Time patterns. +Symbol Meaning English example Special note Usage in pattern example +G era AD, BC This symbol also covers era names and abbreviations for non-Gregorian calendars, such as Japanese. y G = 1999 AD +y +yy year 1987 use y to show as many digits as necessary (987, 2017) +Use yy to always show year in two digits (87, 17, 09). M/d/y = 9/5/2019 M/d/yy = 9/5/19 +M month September Used in patterns to reference use of Formatted month names. MMMM d, y = September 5, 2019 +L month September Used in patterns to reference use of Standalone month names. +See below under Stand-Alone vs Format Styles for the difference between M and L. LLLL d, y =September 5, 2019 +E Day of week Tuesday Used in patterns to reference use of Formatted weekday names. EEEE, MMMM d, y = Sunday, September 5, 2009 +c Day of week Tuesday Used in patterns to reference use of Standalone weekday names. +See below under Stand-Alone vs Format Styles for the difference between E and c. ccc = Sun +d day +h +H +K +k Hour 12 h- hour in a 12 hour clock +H-hour in a 24 hour clock system using 0-23 +K -12 hour cycle using 0 through 11 +k - 24 hour cycle using 1 though 24 h:mm a = 3:25 PM +HH:mm = 15:25 +K:mm a = 0:25 AM +kk:mm = 24:25 +m minute 49 hh:mm a = 03:25 PM +s second 49 h:mm:ss = 3:25:01 PM +a +b +B day period AM noon in the morning a- AM or PM b-am, noon, pm, or midnight +B-"in the morning", "in the evening" (see Day period names) +ONLY used with "h" or K" for all a, b and B See date/time patterns about flexible time formats even if your language does not use 12-hour time clock Also see date/time day period patterns. h:mm a = 3:25 PM +h:mm b = 12:00 noon +h:mm B= 3:25 in the afternoon +z / v timezone Pacific Time, Paris Time Don't change v to z or vice versa; just leave either z or v as in English. h a – h a v = 5 AM – 5 PM GMT +' If you want a sequence of one or more real letters A–Z or a–z within a pattern, you need to put it in single quotes, such as 'ta'. This is because l etters included in a format have special meaning. +For a real single quote, use '' (that is, two adjacent ' characters). German example for skeleton h h 'Uhr' a = 1 Uhr PM +Q Quarter (a concept of 3 months period) These are calendar quarters not fiscal quarters. +4 Quarters in United States for example would be Jan-Mar, Apr-June, July-Sep, Sep-Dec. Also see 💡 Translation Tips below QQQ y = Q3 1999 +Symbol Examples Meaning +M 3, 11 Numeric form, at least 1 digit and without leading zero. +MM 03, 11 Number form, 2 digits with leading zero if necessary +MMM Dec Abbreviated form +MMMM December Full form +MMMMM D Narrow form - only used in where context makes it clear, such as headers in a calendar. Should be one character wherever possible. 💡Translation Tips The symbols using characters a-z and A-Z are special placeholders; they stand for date or time fields. They are NOT real characters. For example, 'y' stands for a numeric year and will be replaced by a value like '1998'. DO NOT "translate" the placeholders; for example, don't change 'y' to 'j' even though in your language the word for "year" starts with a "j". -Any "real" characters need to be quoted. For example, 'g' in a real character in this example pattern: EEE, yyyy. 'g'. dd. MMM +Any "real" characters need to be quoted. For example, 'g' in a real character in this example pattern: EEE, yyyy. 'g'. dd. MMM If your language doesn't have a concept of "Quarters", use a translation that describes the concept "three-month period" rather than “quarter-of-a-year”. Symbol Length The number of letters in a field indicates the format. @@ -20,20 +62,30 @@ Standalone vs. Format Styles This section is relevant to When to use standalone vs. Formatting in date/time patterns. Some languages use two different forms of strings (standalone and format) depending on the context. Typically the standalone version is the nominative form of the word, and the format version is in the genitive (or related form). Two different characters are used: +Field Format Standalone +Month M L +Day of the Week E c 💡 Translation Tips Standalone and Format names must be coordinated with the format strings. See When to use standalone vs. Formatting in date/time patterns. If your language uses two different form, be sure to provide the correct forms under Standalone and Formatting. For example in Brazilian Portuguese "Dezembro" for December when standing alone; thus use LLLL "Dezembru" when referencing December with a date (e.g. to mean "the nth day of that month"); thus, use MMMM -Then, make sure you use the intended forms by using the correct symbol (e.g. LLLL stand-alone form or MMMM format forms). +Then, make sure you use the intended forms by using the correct symbol (e.g. LLLL stand-alone form or MMMM format forms). If your language formats months differently with vowels, eg "14 de gener de 2008" but "14 d'abril de 2008"; the stand-alone and format versions of the months should be as follows; in this case the format strings should not have the extra "de" before the month: -Format Month -de gener -d'abril -Stand-Alone Month -gener -abril +Format Month Stand-Alone Month +de gener gener +d'abril abril These days, standalone names should not be used merely to provide capitalized forms. There are other solutions for capitalizing date symbols which provide finer control over capitalization, see capitalization guidelines. Examples: Nominative/standalone (LLLL) vs genitive/format (MMMM): -Precede months with de or d’ - coordinate with the formats strings, which can't have the extra "de" before the month: \ No newline at end of file +Format Example1 Example2 +LLLL Dezembro Dez. +d MMMM 1 Dezembru 1 Dez. +MMMM d yy Dezembru 1 1953 1 Dez. 53 +Precede months with de or d’ - coordinate with the formats strings, which can't have the extra "de" before the month: +Format String Date Result +LLLL 2008-1-14 gener +2008-4-14 abril +d MMMM 'de' y 2008-1-14 14 de gener de 2008 +2008-4-14 14 d’abril de 2008 +Unicode copyright \ No newline at end of file diff --git a/docs/site/TEMP-TEXT-FILES/date-times-terminology.txt b/docs/site/TEMP-TEXT-FILES/date-times-terminology.txt index 862ae0b2c63..817e1cf280a 100644 --- a/docs/site/TEMP-TEXT-FILES/date-times-terminology.txt +++ b/docs/site/TEMP-TEXT-FILES/date-times-terminology.txt @@ -1,3 +1,9 @@ Date & Time terminology This topic is in-progress and and not finalized yet for use. -Following are terminology and definitions that are used for Date and Time structure and data in CLDR. The terminology used in CLDR have dependency on LDML Spec #35 and names of methods and objects in ICU. \ No newline at end of file +Following are terminology and definitions that are used for Date and Time structure and data in CLDR. The terminology used in CLDR have dependency on LDML Spec #35 and names of methods and objects in ICU. +Terminology Definition Examples +Symbols or Pattern characters or placeholder symbol The ASCII-range letters used in patterns, character in a placeholder field G, y, M, d +pattern fields or placeholder fields A sequence of one or more of the above used in a pattern sequence of characters that is replaced in a pattern at runtime, like MMM, {1}, "###" (in numbers) MMM E +Spec: Elements ICU: textual forms as symbols The specific localized values that replace a pattern fields depending on the date Monday or January, or 7. +calendar fields The abstract calendar type that is represented by the letters era or year. +calendar field “ names" The localized names for each type of calendar field “era” or “year”: \ No newline at end of file diff --git a/docs/site/translation/date-time/date-time-patterns.md b/docs/site/translation/date-time/date-time-patterns.md index d81040a8b9c..b89e8c60967 100644 --- a/docs/site/translation/date-time/date-time-patterns.md +++ b/docs/site/translation/date-time/date-time-patterns.md @@ -20,12 +20,12 @@ There are two types of substrings that are combined in a pattern: 1. Date/time fields, which are placeholders that represent particular calendar values such as month, weekday, year, etc.. 2. "Literal" strings used as-is. These are necessary to make the pattern flow naturally in a given language. 3. For example: - There are three aspects to patterns:  | Skeleton format | English Pattern | English Example | Japanese Pattern | Japanese Example | |:---|---|---|---|---| | **yMMMd** | MMM e, y | Dec 5, 2010 | y年M月d 日 | 2010年12月5日 | +There are three aspects to patterns:  - A letter in the set {a-z; A-Z} indicates the type of calendar field: See [Date/Time Symbols](https://cldr.unicode.org/translation/date-time/date-time-symbols). - For example: - M for month @@ -288,7 +288,7 @@ What you want to pay attention to are: There are four formats: full, long, medium, and short. _Each of these may come in two variants_: -- T_he “-atTime” variant, which specifies a date at a particular time, typically for an event. In the longer formats (such as full and long), this “-atTime” form may have a combining word betwen the date and the time, for example “{1} 'at' {0}” to produce an English example like “Sunday, September 25 at 1:30 PM”)._ +- _The “-atTime” variant, which specifies a date at a particular time, typically for an event. In the longer formats (such as full and long), this “-atTime” form may have a combining word betwen the date and the time, for example “{1} 'at' {0}” to produce an English example like “Sunday, September 25 at 1:30 PM”)._ - _The standard variant, which is used for multuple purposes and typically does not include any literal text, for example “{1}, {0}”. Usage examples include:_ - _Wall clock time: “Sunday, September 25, 1:30 PM”_ - _Combining a date with a time range: “Sunday, September 25, 1:30 – 3:00 PM”_ diff --git a/docs/site/translation/date-time/date-time-symbols.md b/docs/site/translation/date-time/date-time-symbols.md index 53828c58ad9..85907c018f3 100644 --- a/docs/site/translation/date-time/date-time-symbols.md +++ b/docs/site/translation/date-time/date-time-symbols.md @@ -4,7 +4,7 @@ title: Date/Time Symbols # Date/Time Symbols -Symbols is a required topic to work in[Date/Time Patterns](https://cldr.unicode.org/translation/date-time/date-time-patterns) +Symbols is a required topic to work in [Date/Time Patterns](https://cldr.unicode.org/translation/date-time/date-time-patterns) More details on date/time symbols and patterns may be found in the Spec [Date Field Symbol Table](http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).