palantir/blueprint

Support retrieving timezone metadata via properties other than IANA code

Open

#5.794 geöffnet am 9. Dez. 2022

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (2.167 Forks)batch import
P2Package: datetimeType: feature requesthelp wanted

Repository-Metriken

Stars
 (20.263 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 43T 10h) (27 gemergte PRs in 30 T)

Beschreibung

Environment

  • Package version(s): datetime2 v0.9.6

Feature request

@blueprintjs/datetime2 supports getTimezoneMetadata() where you pass in a timezone IANA code. But sometimes I'd like to query for the metadata with other information, like the UTC offset.

When querying by only the offset, we know that one offset may correspond to multiple timezones. In these cases we may only care about the minimal set of timezones (see https://github.com/palantir/blueprint/issues/5793).

We could probably support this in the existing API:

function getTimezoneMetadata(offsetOrIanaCode: string, date?: Date): TimezoneMetadata | undefined;

Contributor Guide