palantir/blueprint

Support retrieving timezone metadata via properties other than IANA code

開放

#5,794 建立於 2022年12月9日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (2,167 個分叉)batch import
P2Package: datetimeType: feature requesthelp wanted

倉庫指標

星標
 (20,263 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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;

貢獻者指南