TimeZone
- Stability:
stable - Since:
0.1.0
Represents a validated IANA time zone name such as UTC or Europe/Berlin. Time zones are used when converting instants to calendar-aware local values.
- Qualified id:
com.dataspine.datetime.TimeZone@1 - Kind:
struct
Properties
| Name | Type | Description |
|---|---|---|
name | String | IANA time zone name. |
Static methods
of
- Stability:
stable
Looks up the name in the bundled IANA database from the execution context. On failure still returns a TimeZone value but sets DateTimeError::InvalidTimezone so callers can branch on the optional error.
of(name: String): TimeZone
Parameters
| Name | Type | Description |
|---|---|---|
name | String | IANA time zone identifier (for example UTC, Europe/Berlin, or America/New_York). |
Return type
Methods
name
- Stability:
stable
Copies the validated identifier that was supplied when constructing or resolving this value.
name(): String
Parameters
This function does not take any parameters.