### LC_TIME Locale Category

The LC_TIME category source definition in locale source files defines field descriptors used for parsing and formatting date and time data in the locale that is compiled from that source by the LOCALDEF utility.

The field descriptors are the conversion specifiers used by the strftime and strptime functions.

The following keywords make up this category definition:

copy abday day abmon mon | d_t_fmt d_fmt t_fmt am_pm t_fmt_ampm | era era_year era_d_fmt alt_digits

`copy``
` Specifies the name of an existing locale to be used as the source for the definition of this category. If this keyword is specified, no other keyword should be present in this category. If the locale is not found, an error is reported and no locale output is created. The copy keyword cannot specify a locale that also specifies the copy keyword for the same category.

`abday`
Defines the abbreviated weekday names, corresponding to the %a field descriptor. The operand consists of seven semicolon-separated strings. the second string corresponds to Monday, and so forth.

`day`
Defines the full weekday names, corresponding to the %A field descriptor. The operand consists of seven semicolon-separated strings. The first string is the full name corresponding to Sunday, the second string to Monday, and so forth.

`abmon`
Defines the abbreviated month names, corresponding to the %b field descriptor. The operand consists of twelve strings separated by semicolons. the second corresponds to February, and so forth.

`mon`
Defines the full month names, corresponding to the %B field descriptor. The operand consists of twelve strings separated by semicolons. The first string is an abbreviated name that corresponds to January, the second corresponds to February, and so forth.

`d_t_fmt`
Defines the appropriate date and time representation, corresponding to the %c field descriptor. The operand consists of a string, which may contain any combination of characters and field descriptors.

`d_fmt`
Defines the appropriate date representation, corresponding to the %x field descriptor. The operand consists of a string, and may contain any combination of characters and field descriptors.

`t_fmt`
Defines the appropriate time representation, corresponding to the %X field descriptor. The operand consists of a string, which may contain any combination of characters and field descriptors.

`am_pm`
Defines the appropriate representation of the ante meridian and post meridian strings, corresponding to the %p field descriptor. The operand consists of two strings, separated by a semicolon. The first string represents the ante meridian designation, the last string the post meridian designation.

`t_fmt_ampm`
Defines the appropriate time representation in the 12-hour clock format with am_pm, corresponding to the %r field descriptor. The operand consists of a string and can contain any combination of characters and field descriptors.

`era``
` Defines how the years are counted and displayed for each era (or emperor's reign) in a locale. No era is needed if the %E field descriptor modifier is not used for the locale. The operand of the era keyword is a string in the format shown below. There must be one string for each era. If there is more than one era, separated the strings with semicolons.

>     direction:offset:start_date:end_date:name:format

> The parts of each string are:
> `direction`
> Either a + or - character. The + character indicates the time axis should be such that the years count in the positive direction when moving from the starting date towards the ending date. The - character indicates the time axis should be such that the years count in the negative direction when moving from the starting date towards the ending date.
> `offset`
> A number of the first year of the era.
> `start_date``
> ` A date in the form yyyy/mm/dd where yyyy, mm and dd are the year, month and day numbers, respectively, of the start of the era. Years prior to the year AD `0` are represented as negative numbers. For example, an era beginning March 5th in the year `100` BC would be represented as `-100/3/5`.
> `end_date``
> ` The ending date of the era in the same form as the start_date above or one of the two special values -* or +*. A value of -* indicates the ending date of the era extends to the beginning of time while +* indicates it extends to the end of time. The ending date may be either before or after the starting date of an era. For example, the strings for the Christian eras AD and BC would be:
> `+:0:0000/01/01:+*:AD:%EC %Ey``
> ` `+:1:-0001/12/31:-*:BC:%EC %Ey``
> ` `name``
> ` A string representing the name of the era which is substituted for the %EC field descriptor.
> `format``
> ` A string for formatting the %EY field descriptor. This string is usually a function of the %EC and %Ey field descriptors.

`era_year``
` Defines the format of the year in alternate era format, corresponding to the %EY field descriptor.

`era_d_fmt``
` Defines the format of the date in alternate era notation, corresponding to the %Ex field descriptor.

`alt_digits`
Defines alternate symbols for digits, corresponding to the %O field descriptor modifier. The operand consists of semicolon-separated strings. The first string is the alternate symbol corresponding to zero, the second string the symbol corresponding to one, and so forth. A maximum of 100 alternate strings may be specified. The %O modifier indicates that the string corresponding to the value specified by the field descriptor is used instead of the value.

Example: LC_TIME Locale Category Definition

Internationalization
Localization and Locales

Customize a Locale

Locale Categories
Locale Source Files