locale

Creates a locale used by date formatting.

Target type

Signature

1locale(language::string, country::string= ?, variant::string= ?)

Creates a locale used by date formatting.

locale constructs or identifies a LaiRu value type. locale handles calendar, duration, or formatting behavior. Store values in structured date or duration form and format them only when presenting text.

Parameters

language
Required value of type string. Supply language positionally unless the signature shows a keyword form.
country
Optional value of type string. Supply country positionally unless the signature shows a keyword form.
variant
Optional value of type string. Supply variant positionally unless the signature shows a keyword form.

Examples

Basic call

1locale('en', 'US')
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.