Extending locale by using named locale facilities

The easiest way to specify the locale specific data is to use the named locale facilities. When you create a named locale with a string that refers to a locale data file, the time facets parse that data file for time facet data.

  locale loc("my_locale");
  

The narrow file "my_locale" can hold time data for both narrow and wide time facets. Wide characters and strings can be represented in the narrow file using hexadecimal or universal format (e.g. '\u06BD'). Narrow time data starts with the keyword:

  $time_narrow
  

And wide time data starts with the keyword:

  $time_wide
  

Otherwise, the format for the time data is identical for the narrow and wide data.

There are twelve keywords that allow you to enter the time facet data:

  1. abrev_weekday
  2. weekday
  3. abrev_monthname
  4. monthname
  5. date_time
  6. am_pm
  7. time_12hour
  8. date
  9. time
  10. time_zone
  11. utc_offset
  12. default_century

You enter data with one of these keywords, followed by an equal sign '=', and then the data. You can specify any or all of the 12 keywords in any order. Data not specified will default to that of the "C" locale.

Note: See String Syntax for syntax details.