@vvo/tzdb 6.198.0 → 6.199.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,54 @@
1
+ export type TimeZoneName = string;
2
+ export interface RawTimeZone {
3
+ /** IANA name of the most populated zone of the group, like "America/Los_Angeles" */
4
+ name: TimeZoneName;
5
+ /** English generic name, like "Pacific Time" */
6
+ alternativeName: string;
7
+ /** Every IANA name, current or deprecated, that shows this exact time */
8
+ group: TimeZoneName[];
9
+ continentCode: string;
10
+ continentName: string;
11
+ countryName: string;
12
+ countryCode: string;
13
+ /** Up to four cities, most populated first */
14
+ mainCities: string[];
15
+ /** UTC offset outside of daylight saving time */
16
+ rawOffsetInMinutes: number;
17
+ /** Abbreviation outside of daylight saving time, like "PST" */
18
+ abbreviation: string;
19
+ /** Abbreviation during daylight saving time, like "PDT". Only for zones that observe it */
20
+ dstAbbreviation?: string;
21
+ rawFormat: string;
22
+ }
23
+ export interface TimeZone extends RawTimeZone {
24
+ /** UTC offset right now, according to the tz database of the browser or Node.js */
25
+ currentTimeOffsetInMinutes: number;
26
+ currentTimeFormat: string;
27
+ /** "PDT" or "PST" depending on the current date */
28
+ currentAbbreviation: string;
29
+ }
30
+ export interface TimeZoneOptions {
31
+ /** Adds an "Etc/UTC" time zone, whose group includes "UTC" and "GMT" */
32
+ includeUtc?: boolean;
33
+ /**
34
+ * Adds the fixed offset time zones from "Etc/GMT-14" to "Etc/GMT+12".
35
+ * Their sign is inverted: "Etc/GMT+5" is 5 hours behind UTC.
36
+ */
37
+ includeGmtOffsets?: boolean;
38
+ /**
39
+ * Translates alternativeName, countryName and continentName with the Intl
40
+ * API, like "fr" or "es-MX". City names are not translated.
41
+ */
42
+ locale?: string;
43
+ }
44
+ export declare const rawTimeZones: RawTimeZone[];
45
+ export declare const timeZonesNames: TimeZoneName[];
46
+ export declare const abbreviations: Record<string, string>;
47
+ /** Release of the IANA tz database used to build the data, like "2026e" */
48
+ export declare const tzdbVersion: string;
49
+ /**
50
+ * Time zones grouped by country and clock, sorted by current offset. The
51
+ * current offset comes from the runtime's own tz database, which browsers
52
+ * and operating systems keep up to date.
53
+ */
54
+ export declare function getTimeZones(options?: TimeZoneOptions): TimeZone[];
package/dist/index.d.ts CHANGED
@@ -1,28 +1,54 @@
1
- type TimeZoneName = string;
2
-
3
- interface RawTimeZone {
4
- name: TimeZoneName;
5
- alternativeName: string;
6
- group: string[];
7
- continentCode: string;
8
- continentName: string;
9
- countryName: string;
10
- countryCode: string;
11
- mainCities: string[];
12
- rawOffsetInMinutes: number;
13
- abbreviation: string;
14
- rawFormat: string;
1
+ export type TimeZoneName = string;
2
+ export interface RawTimeZone {
3
+ /** IANA name of the most populated zone of the group, like "America/Los_Angeles" */
4
+ name: TimeZoneName;
5
+ /** English generic name, like "Pacific Time" */
6
+ alternativeName: string;
7
+ /** Every IANA name, current or deprecated, that shows this exact time */
8
+ group: TimeZoneName[];
9
+ continentCode: string;
10
+ continentName: string;
11
+ countryName: string;
12
+ countryCode: string;
13
+ /** Up to four cities, most populated first */
14
+ mainCities: string[];
15
+ /** UTC offset outside of daylight saving time */
16
+ rawOffsetInMinutes: number;
17
+ /** Abbreviation outside of daylight saving time, like "PST" */
18
+ abbreviation: string;
19
+ /** Abbreviation during daylight saving time, like "PDT". Only for zones that observe it */
20
+ dstAbbreviation?: string;
21
+ rawFormat: string;
15
22
  }
16
-
17
- interface TimeZone extends RawTimeZone {
18
- currentTimeOffsetInMinutes: number;
19
- currentTimeFormat: string;
23
+ export interface TimeZone extends RawTimeZone {
24
+ /** UTC offset right now, according to the tz database of the browser or Node.js */
25
+ currentTimeOffsetInMinutes: number;
26
+ currentTimeFormat: string;
27
+ /** "PDT" or "PST" depending on the current date */
28
+ currentAbbreviation: string;
20
29
  }
21
-
22
- interface TimeZoneOptions {
23
- includeUtc?: boolean;
30
+ export interface TimeZoneOptions {
31
+ /** Adds an "Etc/UTC" time zone, whose group includes "UTC" and "GMT" */
32
+ includeUtc?: boolean;
33
+ /**
34
+ * Adds the fixed offset time zones from "Etc/GMT-14" to "Etc/GMT+12".
35
+ * Their sign is inverted: "Etc/GMT+5" is 5 hours behind UTC.
36
+ */
37
+ includeGmtOffsets?: boolean;
38
+ /**
39
+ * Translates alternativeName, countryName and continentName with the Intl
40
+ * API, like "fr" or "es-MX". City names are not translated.
41
+ */
42
+ locale?: string;
24
43
  }
25
-
26
- export const rawTimeZones: RawTimeZone[];
27
- export const timeZonesNames: TimeZoneName[];
28
- export function getTimeZones(opts?: TimeZoneOptions): TimeZone[];
44
+ export declare const rawTimeZones: RawTimeZone[];
45
+ export declare const timeZonesNames: TimeZoneName[];
46
+ export declare const abbreviations: Record<string, string>;
47
+ /** Release of the IANA tz database used to build the data, like "2026e" */
48
+ export declare const tzdbVersion: string;
49
+ /**
50
+ * Time zones grouped by country and clock, sorted by current offset. The
51
+ * current offset comes from the runtime's own tz database, which browsers
52
+ * and operating systems keep up to date.
53
+ */
54
+ export declare function getTimeZones(options?: TimeZoneOptions): TimeZone[];