Skip to main content

Locale

  • Stability: stable
  • Since: 0.1.0

Represents a locale tag used for locale-aware datetime formatting and parsing.

  • Qualified id: com.dataspine.datetime.Locale@1
  • Kind: struct

Properties

NameTypeDescription
tagStringBCP-47 locale tag.

Static methods

of

  • Stability: stable

Validates the tag against bundled locale data. Like TimeZone.of, a failed lookup still returns a Locale shell but sets DateTimeError::InvalidLocale in the optional slot.

of(tag: String): Locale

Parameters

NameTypeDescription
tagStringBCP-47 locale tag such as en-US or de-DE.

Return type

Locale

Methods

tag

  • Stability: stable

Copies the tag string associated with this locale value.

tag(): String

Parameters

This function does not take any parameters.

Return type

String

Back to Datetime