diff --git a/README.md b/README.md
index 2ce158a..c0cef0e 100644
--- a/README.md
+++ b/README.md
@@ -17,10 +17,10 @@ The simplest, most intuitive date and time library.
## Installation
```shell
-npm i date-and-time
+npm install date-and-time
```
-- ES Modules:
+### ES Modules (Recommended)
```typescript
import { format } from 'date-and-time';
@@ -29,7 +29,7 @@ format(new Date(), 'ddd, MMM DD YYYY');
// => Wed, Jul 09 2025
```
-- CommonJS:
+### CommonJS
```typescript
const { format } = require('date-and-time');
@@ -38,6 +38,28 @@ format(new Date(), 'ddd, MMM DD YYYY');
// => Wed, Jul 09 2025
```
+## CDN Usage
+
+### Via jsDelivr
+
+```html
+
+```
+
+### Via unpkg
+
+```html
+
+```
+
## Migration
Version `4.x` has been completely rewritten in TypeScript and some features from `3.x` are no longer compatible. The main changes are as follows:
diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts
index 61c68d7..2e60ecc 100644
--- a/docs/.vitepress/config.ts
+++ b/docs/.vitepress/config.ts
@@ -59,8 +59,16 @@ export default defineConfig({
{ text: 'addSeconds()', link: '/api/addSeconds' },
{ text: 'addMilliseconds()', link: '/api/addMilliseconds' },
{ text: 'subtract()', link: '/api/subtract' },
- { text: 'isLeapYear()', link: '/api/isLeapYear' },
- { text: 'isSameDay()', link: '/api/isSameDay' },
+ ]
+ },
+ {
+ text: 'Utility Functions',
+ items: [
+ { text: 'isLeapYear()', link: '/api/utils/isLeapYear' },
+ { text: 'isSameDay()', link: '/api/utils/isSameDay' },
+ { text: 'getDaysInMonth()', link: '/api/utils/getDaysInMonth' },
+ { text: 'getISOWeekYear()', link: '/api/utils/getISOWeekYear' },
+ { text: 'getISOWeek()', link: '/api/utils/getISOWeek' },
]
}
]
diff --git a/docs/api/addDays.md b/docs/api/addDays.md
index 068c4b9..69ba855 100644
--- a/docs/api/addDays.md
+++ b/docs/api/addDays.md
@@ -10,11 +10,11 @@ addDays(dateObj, days[, timeZone])
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateObj` | `Date` | Yes | The base Date object |
-| `days` | `number` | Yes | Number of days to add (positive) or subtract (negative) |
-| `timeZone` | `TimeZone \| string` | No | Timezone for the calculation |
+| Parameter | Type | Required | Description |
+|------------|----------------------|----------|---------------------------------------------------------|
+| `dateObj` | `Date` | Yes | The base Date object |
+| `days` | `number` | Yes | Number of days to add (positive) or subtract (negative) |
+| `timeZone` | `TimeZone \| string` | No | Timezone for the calculation |
### Returns
@@ -42,13 +42,12 @@ console.log(past); // August 10, 2024
```typescript
import { addDays } from 'date-and-time';
-import New_York from 'date-and-time/timezones/America/New_York';
// Working with specific timezones
const nyDate = new Date('2024-03-10T05:00:00Z'); // March 10, 2024 05:00 UTC (DST transition day)
// Add 30 days in New York timezone
-const futureNY = addDays(nyDate, 30, New_York);
+const futureNY = addDays(nyDate, 30, 'America/New_York');
console.log(futureNY); // April 9, 2024 04:00 UTC (EDT, DST adjusted)
// UTC calculation for comparison
@@ -56,20 +55,6 @@ const futureUTC = addDays(nyDate, 30, 'UTC');
console.log(futureUTC); // April 9, 2024 05:00 UTC (same time, no DST adjustment)
```
-### Using IANA Timezone Name Strings
-
-As of v4.3.0, you can use IANA timezone name strings directly instead of importing TimeZone objects:
-
-```typescript
-import { addDays } from 'date-and-time';
-
-const nyDate = new Date('2024-03-10T05:00:00Z'); // March 10, 2024 05:00 UTC
-
-// Using IANA timezone name string (New in v4.3.0)
-const futureNY = addDays(nyDate, 30, 'America/New_York');
-console.log(futureNY); // April 9, 2024 04:00 UTC (EDT, DST adjusted)
-```
-
## Use Cases
### Work Day Calculations
diff --git a/docs/api/addHours.md b/docs/api/addHours.md
index e356934..6f1ba20 100644
--- a/docs/api/addHours.md
+++ b/docs/api/addHours.md
@@ -10,10 +10,10 @@ addHours(dateObj, hours)
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateObj` | `Date` | Yes | The base Date object |
-| `hours` | `number` | Yes | Number of hours to add (positive) or subtract (negative) |
+| Parameter | Type | Required | Description |
+|-----------|----------|----------|----------------------------------------------------------|
+| `dateObj` | `Date` | Yes | The base Date object |
+| `hours` | `number` | Yes | Number of hours to add (positive) or subtract (negative) |
### Returns
diff --git a/docs/api/addMilliseconds.md b/docs/api/addMilliseconds.md
index 623d389..0545b8a 100644
--- a/docs/api/addMilliseconds.md
+++ b/docs/api/addMilliseconds.md
@@ -10,10 +10,10 @@ addMilliseconds(dateObj, milliseconds)
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateObj` | `Date` | Yes | The base Date object |
-| `milliseconds` | `number` | Yes | Number of milliseconds to add (positive) or subtract (negative) |
+| Parameter | Type | Required | Description |
+|----------------|----------|----------|-----------------------------------------------------------------|
+| `dateObj` | `Date` | Yes | The base Date object |
+| `milliseconds` | `number` | Yes | Number of milliseconds to add (positive) or subtract (negative) |
### Returns
diff --git a/docs/api/addMinutes.md b/docs/api/addMinutes.md
index c315510..22ffef8 100644
--- a/docs/api/addMinutes.md
+++ b/docs/api/addMinutes.md
@@ -10,10 +10,10 @@ addMinutes(dateObj, minutes)
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateObj` | `Date` | Yes | The base Date object |
-| `minutes` | `number` | Yes | Number of minutes to add (positive) or subtract (negative) |
+| Parameter | Type | Required | Description |
+|-----------|----------|----------|------------------------------------------------------------|
+| `dateObj` | `Date` | Yes | The base Date object |
+| `minutes` | `number` | Yes | Number of minutes to add (positive) or subtract (negative) |
### Returns
diff --git a/docs/api/addMonths.md b/docs/api/addMonths.md
index 36517fd..25c66dc 100644
--- a/docs/api/addMonths.md
+++ b/docs/api/addMonths.md
@@ -10,11 +10,11 @@ addMonths(dateObj, months[, timeZone])
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateObj` | `Date` | Yes | The base Date object |
-| `months` | `number` | Yes | Number of months to add (positive) or subtract (negative) |
-| `timeZone` | `TimeZone \| string` | No | Timezone for the calculation |
+| Parameter | Type | Required | Description |
+|------------|----------------------|----------|-----------------------------------------------------------|
+| `dateObj` | `Date` | Yes | The base Date object |
+| `months` | `number` | Yes | Number of months to add (positive) or subtract (negative) |
+| `timeZone` | `TimeZone \| string` | No | Timezone for the calculation |
### Returns
@@ -42,13 +42,12 @@ console.log(past); // October 15, 2023
```typescript
import { addMonths } from 'date-and-time';
-import New_York from 'date-and-time/timezones/America/New_York';
// Working with specific timezones
const nyDate = new Date('2024-03-10T05:00:00Z'); // March 10, 2024 05:00 UTC (DST transition day)
// Add 6 months in New York timezone
-const futureNY = addMonths(nyDate, 6, New_York);
+const futureNY = addMonths(nyDate, 6, 'America/New_York');
console.log(futureNY); // September 10, 2024 04:00 UTC (EDT, DST adjusted)
// UTC calculation for comparison
@@ -56,20 +55,6 @@ const futureUTC = addMonths(nyDate, 6, 'UTC');
console.log(futureUTC); // September 10, 2024 05:00 UTC (same time, no DST adjustment)
```
-### Using IANA Timezone Name Strings
-
-As of v4.3.0, you can use IANA timezone name strings directly instead of importing TimeZone objects:
-
-```typescript
-import { addMonths } from 'date-and-time';
-
-const nyDate = new Date('2024-03-10T05:00:00Z'); // March 10, 2024 05:00 UTC
-
-// Using IANA timezone name string (New in v4.3.0)
-const futureNY = addMonths(nyDate, 6, 'America/New_York');
-console.log(futureNY); // September 10, 2024 04:00 UTC (EDT, DST adjusted)
-```
-
## Use Cases
### Payment Due Dates
diff --git a/docs/api/addSeconds.md b/docs/api/addSeconds.md
index 5f93c14..8ac6916 100644
--- a/docs/api/addSeconds.md
+++ b/docs/api/addSeconds.md
@@ -10,10 +10,10 @@ addSeconds(dateObj, seconds)
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateObj` | `Date` | Yes | The base Date object |
-| `seconds` | `number` | Yes | Number of seconds to add (positive) or subtract (negative) |
+| Parameter | Type | Required | Description |
+|-----------|----------|----------|------------------------------------------------------------|
+| `dateObj` | `Date` | Yes | The base Date object |
+| `seconds` | `number` | Yes | Number of seconds to add (positive) or subtract (negative) |
### Returns
diff --git a/docs/api/addYears.md b/docs/api/addYears.md
index 8a85e20..b8cb861 100644
--- a/docs/api/addYears.md
+++ b/docs/api/addYears.md
@@ -10,11 +10,11 @@ addYears(dateObj, years[, timeZone])
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateObj` | `Date` | Yes | The base Date object |
-| `years` | `number` | Yes | Number of years to add (positive) or subtract (negative) |
-| `timeZone` | `TimeZone \| string` | No | Timezone for the calculation |
+| Parameter | Type | Required | Description |
+|------------|----------------------|----------|----------------------------------------------------------|
+| `dateObj` | `Date` | Yes | The base Date object |
+| `years` | `number` | Yes | Number of years to add (positive) or subtract (negative) |
+| `timeZone` | `TimeZone \| string` | No | Timezone for the calculation |
### Returns
@@ -42,13 +42,12 @@ console.log(past); // January 15, 2022
```typescript
import { addYears } from 'date-and-time';
-import New_York from 'date-and-time/timezones/America/New_York';
// Working with specific timezones
const nyDate = new Date('2024-03-10T05:00:00Z'); // March 10, 2024 05:00 UTC (DST transition day)
// Add years in New York timezone
-const futureNY = addYears(nyDate, 1, New_York);
+const futureNY = addYears(nyDate, 1, 'America/New_York');
console.log(futureNY); // March 10, 2025 04:00 UTC (EST, DST adjusted)
// UTC calculation for comparison
@@ -56,20 +55,6 @@ const futureUTC = addYears(nyDate, 1, 'UTC');
console.log(futureUTC); // March 10, 2025 05:00 UTC (same time, no DST adjustment)
```
-### Using IANA Timezone Name Strings
-
-As of v4.3.0, you can use IANA timezone name strings directly instead of importing TimeZone objects:
-
-```typescript
-import { addYears } from 'date-and-time';
-
-const nyDate = new Date('2024-03-10T05:00:00Z'); // March 10, 2024 05:00 UTC
-
-// Using IANA timezone name string (New in v4.3.0)
-const futureNY = addYears(nyDate, 1, 'America/New_York');
-console.log(futureNY); // March 10, 2025 04:00 UTC (EST, DST adjusted)
-```
-
## Use Cases
### Age Calculation
diff --git a/docs/api/compile.md b/docs/api/compile.md
index 00fc2f8..0721463 100644
--- a/docs/api/compile.md
+++ b/docs/api/compile.md
@@ -10,9 +10,9 @@ compile(formatString)
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `formatString` | `string` | Yes | The format pattern to compile |
+| Parameter | Type | Required | Description |
+|----------------|----------|----------|-------------------------------|
+| `formatString` | `string` | Yes | The format pattern to compile |
### Returns
diff --git a/docs/api/format.md b/docs/api/format.md
index 2a0dd91..c9b00a3 100644
--- a/docs/api/format.md
+++ b/docs/api/format.md
@@ -10,11 +10,11 @@ format(dateObj, formatString[, options])
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateObj` | `Date` | Yes | The Date object to format |
-| `formatString` | `string \| CompiledObject` | Yes | The format string or compiled object |
-| `options` | `FormatterOptions` | No | Formatter options for customization |
+| Parameter | Type | Required | Description |
+|----------------|----------------------------|----------|--------------------------------------|
+| `dateObj` | `Date` | Yes | The Date object to format |
+| `formatString` | `string \| CompiledObject` | Yes | The format string or compiled object |
+| `options` | `FormatterOptions` | No | Formatter options for customization |
### Returns
@@ -41,67 +41,77 @@ format(now, 'hh:mm A [GMT]Z');
### Date Tokens
-| Token | Description | Output Examples |
-|-------|-------------|-----------------|
-| `YYYY` | 4-digit year | 0999, 2015 |
-| `YY` | 2-digit year | 99, 01, 15 |
-| `Y` | Year without zero padding | 2, 44, 888, 2015 |
-| `MMMM` | Full month name | January, December |
-| `MMM` | Short month name | Jan, Dec |
-| `MM` | Month (01-12) | 01, 12 |
-| `M` | Month without zero padding | 1, 12 |
-| `DD` | Day (01-31) | 02, 31 |
-| `D` | Day without zero padding | 2, 31 |
+| Token | Description | Output Examples |
+|--------|----------------------------|-------------------|
+| `YYYY` | 4-digit year | 0999, 2015 |
+| `YY` | 2-digit year | 99, 01, 15 |
+| `Y` | Year without zero padding | 2, 44, 888, 2015 |
+| `MMMM` | Full month name | January, December |
+| `MMM` | Short month name | Jan, Dec |
+| `MM` | Month (01-12) | 01, 12 |
+| `M` | Month without zero padding | 1, 12 |
+| `DD` | Day (01-31) | 02, 31 |
+| `D` | Day without zero padding | 2, 31 |
### Day of Week Tokens
-| Token | Description | Output Examples |
-|-------|-------------|-----------------|
-| `dddd` | Full day name | Friday, Sunday |
-| `ddd` | Short day name | Fri, Sun |
-| `dd` | Very short day name | Fr, Su |
+| Token | Description | Output Examples |
+|--------|---------------------|-----------------|
+| `dddd` | Full day name | Friday, Sunday |
+| `ddd` | Short day name | Fri, Sun |
+| `dd` | Very short day name | Fr, Su |
### Time Tokens
-| Token | Description | Output Examples |
-|-------|-------------|-----------------|
-| `HH` | Hour in 24-hour format | 23, 08 |
-| `H` | Hour in 24-hour format without zero padding | 23, 8 |
-| `hh` | Hour in 12-hour format | 11, 08 |
-| `h` | Hour in 12-hour format without zero padding | 11, 8 |
-| `mm` | Minutes | 14, 07 |
-| `m` | Minutes without zero padding | 14, 7 |
-| `ss` | Seconds | 05, 10 |
-| `s` | Seconds without zero padding | 5, 10 |
-| `SSS` | 3-digit milliseconds | 753, 022 |
-| `SS` | 2-digit milliseconds | 75, 02 |
-| `S` | 1-digit milliseconds | 7, 0 |
+| Token | Description | Output Examples |
+|-------|---------------------------------------------|-----------------|
+| `HH` | Hour in 24-hour format | 23, 08 |
+| `H` | Hour in 24-hour format without zero padding | 23, 8 |
+| `hh` | Hour in 12-hour format | 11, 08 |
+| `h` | Hour in 12-hour format without zero padding | 11, 8 |
+| `mm` | Minutes | 14, 07 |
+| `m` | Minutes without zero padding | 14, 7 |
+| `ss` | Seconds | 05, 10 |
+| `s` | Seconds without zero padding | 5, 10 |
+| `SSS` | 3-digit milliseconds | 753, 022 |
+| `SS` | 2-digit milliseconds | 75, 02 |
+| `S` | 1-digit milliseconds | 7, 0 |
### AM/PM Tokens
-| Token | Description | Output Examples |
-|-------|-------------|-----------------|
-| `A` | Uppercase AM/PM | AM, PM |
-| `AA` | Uppercase AM/PM (with periods) | A.M., P.M. |
-| `a` | Lowercase AM/PM | am, pm |
-| `aa` | Lowercase AM/PM (with periods) | a.m., p.m. |
+| Token | Description | Output Examples |
+|-------|--------------------------------|-----------------|
+| `A` | Uppercase AM/PM | AM, PM |
+| `AA` | Uppercase AM/PM (with periods) | A.M., P.M. |
+| `a` | Lowercase AM/PM | am, pm |
+| `aa` | Lowercase AM/PM (with periods) | a.m., p.m. |
### Timezone Tokens
-| Token | Description | Output Examples |
-|-------|-------------|-----------------|
-| `Z` | Timezone offset | +0100, -0800 |
-| `ZZ` | Timezone offset with colon | +01:00, -08:00 |
+| Token | Description | Output Examples |
+|-------|----------------------------|-----------------|
+| `Z` | Timezone offset | +0100, -0800 |
+| `ZZ` | Timezone offset with colon | +01:00, -08:00 |
### Plugin Tokens
Additional tokens available with plugins:
-| Token | Description | Output Examples | Plugin Required |
-|-------|-------------|-----------------|-----------------|
-| `DDD` | Ordinal representation | 1st, 2nd, 3rd | ordinal |
-| `z` | Short timezone name | PST, EST | zonename |
-| `zz` | Long timezone name | Pacific Standard Time | zonename |
+| Token | Description | Output Examples | Plugin Required |
+|--------|-------------------------------------|-----------------------|-----------------|
+| `DDD` | Ordinal representation | 1st, 2nd, 3rd | ordinal |
+| `Q` | Quarter of year | 1, 2, 3, 4 | quarter |
+| `t` | Unix timestamp (seconds) | 0, 1000000000 | timestamp |
+| `T` | Unix timestamp (milliseconds) | 0, 1000000000000 | timestamp |
+| `W` | ISO week number | 1, 27, 53 | week |
+| `WW` | ISO week number (zero-padded) | 01, 27, 53 | week |
+| `G` | ISO week year | 2024, 2025 | week |
+| `GG` | ISO week year (2-digit zero-padded) | 24, 25 | week |
+| `GGGG` | ISO week year (4-digit zero-padded) | 2024, 2025 | week |
+| `z` | Short timezone name | PST, EST | zonename |
+| `zz` | Long timezone name | Pacific Standard Time | zonename |
+
+For available plugins, see the [`plugins`](#plugins) option in FormatterOptions.
## FormatterOptions
@@ -134,41 +144,27 @@ For a complete list of all supported locales with import examples, see [Supporte
### timeZone
-**Type**: `TimeZone | string`
+**Type**: `TimeZone | string`
**Default**: `undefined` (local timezone)
-Converts the date to the specified timezone before formatting. You can specify a timezone in three ways:
+Converts the date to the specified timezone before formatting.
```typescript
import { format } from 'date-and-time';
-// Method 1: Individual timezone import
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
-import New_York from 'date-and-time/timezones/America/New_York';
-
-// Method 2: Consolidated timezone import
-import { Tokyo as TokyoTZ, New_York as NY } from 'date-and-time/timezone';
-
const date = new Date();
-// Using TimeZone object (individual import)
-format(date, 'YYYY-MM-DD HH:mm:ss [JST]', { timeZone: Tokyo });
+format(date, 'YYYY-MM-DD HH:mm:ss [JST]', { timeZone: 'Asia/Tokyo' });
// => 2025-08-23 23:30:45 JST
-// Using TimeZone object (consolidated import)
-format(date, 'YYYY-MM-DD HH:mm:ss [EST]', { timeZone: NY });
-// => 2025-08-23 09:30:45 EST
-
-// Using IANA timezone name string
format(date, 'YYYY-MM-DD HH:mm:ss [EST]', { timeZone: 'America/New_York' });
// => 2025-08-23 09:30:45 EST
-// Format in UTC
format(date, 'YYYY-MM-DD HH:mm:ss [UTC]', { timeZone: 'UTC' });
// => 2025-08-23 14:30:45 UTC
```
-For a complete list of all supported timezones with import examples, see [Supported Timezones](../timezones).
+For a complete list of all supported timezones, see [Supported Timezones](../timezones).
### numeral
@@ -324,29 +320,8 @@ format(date, '\\[YYYY-MM-DD HH:mm:ss\\]');
import { format } from 'date-and-time';
import ja from 'date-and-time/locales/ja';
-// Method 1: Individual timezone import
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
-
-// Method 2: Consolidated timezone import (alternative)
-import { Tokyo as TokyoTZ } from 'date-and-time/timezone';
-
const date = new Date();
-// Japanese with timezone (using individual import)
-format(date, 'YYYY年MMMM月D日dddd Ah:mm:ss [GMT]Z', {
- timeZone: Tokyo,
- locale: ja
-});
-// => 2025年8月23日土曜日 午後11:30:45 GMT+0900
-
-// Or using consolidated import
-format(date, 'YYYY年MMMM月D日dddd Ah:mm:ss [GMT]Z', {
- timeZone: TokyoTZ,
- locale: ja
-});
-// => 2025年8月23日土曜日 午後11:30:45 GMT+0900
-
-// Or using IANA timezone name string
format(date, 'YYYY年MMMM月D日dddd Ah:mm:ss [GMT]Z', {
timeZone: 'Asia/Tokyo',
locale: ja
diff --git a/docs/api/index.md b/docs/api/index.md
index 149ed2a..85d939b 100644
--- a/docs/api/index.md
+++ b/docs/api/index.md
@@ -6,34 +6,37 @@ Welcome to the comprehensive API reference for date-and-time v4.x. This section
### Formatting and Parsing
-| Function | Description |
-|----------|-------------|
-| [`format()`](./format) | Convert Date objects to formatted strings |
-| [`parse()`](./parse) | Parse date strings into Date objects |
-| [`compile()`](./compile) | Precompile format patterns for performance |
-| [`preparse()`](./preparse) | Parse and return intermediate parsing results |
-| [`isValid()`](./isValid) | Validate date string formats |
-| [`transform()`](./transform) | Transform date strings between formats |
+| Function | Description |
+|------------------------------|-----------------------------------------------|
+| [`format()`](./format) | Convert Date objects to formatted strings |
+| [`parse()`](./parse) | Parse date strings into Date objects |
+| [`compile()`](./compile) | Precompile format patterns for performance |
+| [`preparse()`](./preparse) | Parse and return intermediate parsing results |
+| [`isValid()`](./isValid) | Validate date string formats |
+| [`transform()`](./transform) | Transform date strings between formats |
### Date Arithmetic
-| Function | Description |
-|----------|-------------|
-| [`addYears()`](./add-functions#addyears) | Add/subtract years from dates |
-| [`addMonths()`](./add-functions#addmonths) | Add/subtract months from dates |
-| [`addDays()`](./add-functions#adddays) | Add/subtract days from dates |
-| [`addHours()`](./add-functions#addhours) | Add/subtract hours from dates |
-| [`addMinutes()`](./add-functions#addminutes) | Add/subtract minutes from dates |
-| [`addSeconds()`](./add-functions#addseconds) | Add/subtract seconds from dates |
-| [`addMilliseconds()`](./add-functions#addmilliseconds) | Add/subtract milliseconds from dates |
-| [`subtract()`](./subtract) | Calculate time differences with Duration objects |
+| Function | Description |
+|--------------------------------------------------------|--------------------------------------------------|
+| [`addYears()`](./add-functions#addyears) | Add/subtract years from dates |
+| [`addMonths()`](./add-functions#addmonths) | Add/subtract months from dates |
+| [`addDays()`](./add-functions#adddays) | Add/subtract days from dates |
+| [`addHours()`](./add-functions#addhours) | Add/subtract hours from dates |
+| [`addMinutes()`](./add-functions#addminutes) | Add/subtract minutes from dates |
+| [`addSeconds()`](./add-functions#addseconds) | Add/subtract seconds from dates |
+| [`addMilliseconds()`](./add-functions#addmilliseconds) | Add/subtract milliseconds from dates |
+| [`subtract()`](./subtract) | Calculate time differences with Duration objects |
### Utility Functions
-| Function | Description |
-|----------|-------------|
-| [`isLeapYear()`](./utilities#isleapyear) | Check if a year is a leap year |
-| [`isSameDay()`](./utilities#issameday) | Check if two dates are on the same day |
+| Function | Description |
+|----------------------------------------------|----------------------------------------|
+| [`isLeapYear()`](./utils/isLeapYear) | Check if a year is a leap year |
+| [`isSameDay()`](./utils/isSameDay) | Check if two dates are on the same day |
+| [`getDaysInMonth()`](./utils/getDaysInMonth) | Get the number of days in a month |
+| [`getISOWeekYear()`](./utils/getISOWeekYear) | Get the ISO week year for a date |
+| [`getISOWeek()`](./utils/getISOWeek) | Get the ISO week number for a date |
## Quick Examples
@@ -60,11 +63,10 @@ isValid('2025-02-29', 'YYYY-MM-DD'); // => false (not a leap year)
```typescript
import { format } from 'date-and-time';
import ja from 'date-and-time/locales/ja';
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
format(new Date(), 'YYYY年M月D日(ddd) HH:mm', {
locale: ja,
- timeZone: Tokyo
+ timeZone: 'Asia/Tokyo'
});
// => 2025年8月23日(土) 23:30
```
@@ -104,52 +106,52 @@ interface ParserOptions {
### Date Tokens
-| Token | Meaning | Output Examples |
-|-------|---------|-----------------|
-| `YYYY` | 4-digit year | 0999, 2015 |
-| `YY` | 2-digit year | 99, 01, 15 |
-| `Y` | Year without zero padding | 2, 44, 888, 2015 |
-| `MMMM` | Full month name | January, December |
-| `MMM` | Short month name | Jan, Dec |
-| `MM` | Month | 01, 12 |
-| `M` | Month without zero padding | 1, 12 |
-| `DD` | Day | 02, 31 |
-| `D` | Day without zero padding | 2, 31 |
+| Token | Meaning | Output Examples |
+|--------|----------------------------|-------------------|
+| `YYYY` | 4-digit year | 0999, 2015 |
+| `YY` | 2-digit year | 99, 01, 15 |
+| `Y` | Year without zero padding | 2, 44, 888, 2015 |
+| `MMMM` | Full month name | January, December |
+| `MMM` | Short month name | Jan, Dec |
+| `MM` | Month | 01, 12 |
+| `M` | Month without zero padding | 1, 12 |
+| `DD` | Day | 02, 31 |
+| `D` | Day without zero padding | 2, 31 |
### Time Tokens
-| Token | Meaning | Output Examples |
-|-------|---------|-----------------|
-| `HH` | Hour in 24-hour format | 23, 08 |
-| `H` | Hour in 24-hour format without zero padding | 23, 8 |
-| `hh` | Hour in 12-hour format | 11, 08 |
-| `h` | Hour in 12-hour format without zero padding | 11, 8 |
-| `mm` | Minutes | 14, 07 |
-| `m` | Minutes without zero padding | 14, 7 |
-| `ss` | Seconds | 05, 10 |
-| `s` | Seconds without zero padding | 5, 10 |
-| `SSS` | 3-digit milliseconds | 753, 022 |
-| `SS` | 2-digit milliseconds | 75, 02 |
-| `S` | 1-digit milliseconds | 7, 0 |
+| Token | Meaning | Output Examples |
+|-------|---------------------------------------------|-----------------|
+| `HH` | Hour in 24-hour format | 23, 08 |
+| `H` | Hour in 24-hour format without zero padding | 23, 8 |
+| `hh` | Hour in 12-hour format | 11, 08 |
+| `h` | Hour in 12-hour format without zero padding | 11, 8 |
+| `mm` | Minutes | 14, 07 |
+| `m` | Minutes without zero padding | 14, 7 |
+| `ss` | Seconds | 05, 10 |
+| `s` | Seconds without zero padding | 5, 10 |
+| `SSS` | 3-digit milliseconds | 753, 022 |
+| `SS` | 2-digit milliseconds | 75, 02 |
+| `S` | 1-digit milliseconds | 7, 0 |
### Day of Week Tokens
-| Token | Meaning | Output Examples |
-|-------|---------|-----------------|
-| `dddd` | Full day name | Friday, Sunday |
-| `ddd` | Short day name | Fri, Sun |
-| `dd` | Very short day name | Fr, Su |
+| Token | Meaning | Output Examples |
+|--------|---------------------|-----------------|
+| `dddd` | Full day name | Friday, Sunday |
+| `ddd` | Short day name | Fri, Sun |
+| `dd` | Very short day name | Fr, Su |
### AM/PM and Timezone Tokens
-| Token | Meaning | Output Examples |
-|-------|---------|-----------------|
-| `A` | Uppercase AM/PM | AM, PM |
-| `AA` | Uppercase AM/PM (with periods) | A.M., P.M. |
-| `a` | Lowercase AM/PM | am, pm |
-| `aa` | Lowercase AM/PM (with periods) | a.m., p.m. |
-| `Z` | Timezone offset | +0100, -0800 |
-| `ZZ` | Timezone offset with colon | +01:00, -08:00 |
+| Token | Meaning | Output Examples |
+|-------|--------------------------------|-----------------|
+| `A` | Uppercase AM/PM | AM, PM |
+| `AA` | Uppercase AM/PM (with periods) | A.M., P.M. |
+| `a` | Lowercase AM/PM | am, pm |
+| `aa` | Lowercase AM/PM (with periods) | a.m., p.m. |
+| `Z` | Timezone offset | +0100, -0800 |
+| `ZZ` | Timezone offset with colon | +01:00, -08:00 |
## Supported Locales
@@ -170,17 +172,14 @@ For a complete list of all supported locales with import examples, see [Supporte
## Supported Timezones
-Complete IANA timezone database support. Import specific timezones:
+Complete IANA timezone database support. Pass an IANA timezone name string directly to any function:
```typescript
-// Examples
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
-import New_York from 'date-and-time/timezones/America/New_York';
-import London from 'date-and-time/timezones/Europe/London';
-import Sydney from 'date-and-time/timezones/Australia/Sydney';
+format(new Date(), 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Asia/Tokyo' });
+format(new Date(), 'YYYY-MM-DD HH:mm:ss', { timeZone: 'America/New_York' });
```
-For a complete list of all supported timezones with import examples, see [Supported Timezones](../timezones).
+For a complete list of all supported timezones, see [Supported Timezones](../timezones).
## Numeral Systems
diff --git a/docs/api/isValid.md b/docs/api/isValid.md
index 6f2f091..9aa4f31 100644
--- a/docs/api/isValid.md
+++ b/docs/api/isValid.md
@@ -10,11 +10,11 @@ isValid(dateString, formatString[, options])
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateString` | `string` | Yes | The date string to validate |
-| `formatString` | `string \| CompiledObject` | Yes | The format pattern or compiled object |
-| `options` | `ParserOptions` | No | Parser options for validation (see [`parse()`](./parse#parseroptions) for details) |
+| Parameter | Type | Required | Description |
+|----------------|----------------------------|----------|------------------------------------------------------------------------------------|
+| `dateString` | `string` | Yes | The date string to validate |
+| `formatString` | `string \| CompiledObject` | Yes | The format pattern or compiled object |
+| `options` | `ParserOptions` | No | Parser options for validation (see [`parse()`](./parse#parseroptions) for details) |
### Returns
@@ -26,20 +26,20 @@ isValid(dateString, formatString[, options])
import { isValid } from 'date-and-time';
// Valid dates
-isValid('2025-08-23', 'YYYY-MM-DD'); // => true
-isValid('08/23/2025', 'MM/DD/YYYY'); // => true
-isValid('14:30:45', 'HH:mm:ss'); // => true
-isValid('2:30 PM', 'h:mm A'); // => true
+isValid('2025-08-23', 'YYYY-MM-DD'); // => true
+isValid('08/23/2025', 'MM/DD/YYYY'); // => true
+isValid('14:30:45', 'HH:mm:ss'); // => true
+isValid('2:30 PM', 'h:mm A'); // => true
// Invalid dates
-isValid('2025-02-30', 'YYYY-MM-DD'); // => false (Feb 30th doesn't exist)
-isValid('2025-13-01', 'YYYY-MM-DD'); // => false (month 13 doesn't exist)
-isValid('25:30:00', 'HH:mm:ss'); // => false (hour 25 doesn't exist)
-isValid('invalid-date', 'YYYY-MM-DD'); // => false (doesn't match format)
+isValid('2025-02-30', 'YYYY-MM-DD'); // => false (Feb 30th doesn't exist)
+isValid('2025-13-01', 'YYYY-MM-DD'); // => false (month 13 doesn't exist)
+isValid('25:30:00', 'HH:mm:ss'); // => false (hour 25 doesn't exist)
+isValid('invalid-date', 'YYYY-MM-DD'); // => false (doesn't match format)
// Format mismatch
-isValid('2025-08-23', 'MM/DD/YYYY'); // => false (wrong format)
-isValid('08/23/2025', 'YYYY-MM-DD'); // => false (wrong format)
+isValid('2025-08-23', 'MM/DD/YYYY'); // => false (wrong format)
+isValid('08/23/2025', 'YYYY-MM-DD'); // => false (wrong format)
```
## Validation with Options
@@ -61,13 +61,13 @@ isValid('23 de invalid de 2025', 'D [de] MMMM [de] YYYY', { locale: es }); // =>
import { isValid } from 'date-and-time';
// Case-sensitive (default)
-isValid('AUGUST 23, 2025', 'MMMM D, YYYY'); // => false
-isValid('august 23, 2025', 'MMMM D, YYYY'); // => false
+isValid('AUGUST 23, 2025', 'MMMM D, YYYY'); // => false
+isValid('august 23, 2025', 'MMMM D, YYYY'); // => false
// Case-insensitive
-isValid('AUGUST 23, 2025', 'MMMM D, YYYY', { ignoreCase: true }); // => true
-isValid('august 23, 2025', 'MMMM D, YYYY', { ignoreCase: true }); // => true
-isValid('August 23, 2025', 'MMMM D, YYYY'); // => true (correct case)
+isValid('AUGUST 23, 2025', 'MMMM D, YYYY', { ignoreCase: true }); // => true
+isValid('august 23, 2025', 'MMMM D, YYYY', { ignoreCase: true }); // => true
+isValid('August 23, 2025', 'MMMM D, YYYY'); // => true (correct case)
```
## Advanced Validation Patterns
diff --git a/docs/api/parse.md b/docs/api/parse.md
index 1117820..4c1a5e9 100644
--- a/docs/api/parse.md
+++ b/docs/api/parse.md
@@ -10,11 +10,11 @@ parse(dateString, formatString[, options])
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateString` | `string` | Yes | The date string to parse |
-| `formatString` | `string \| CompiledObject` | Yes | The format pattern or compiled object |
-| `options` | `ParserOptions` | No | Parser options for customization |
+| Parameter | Type | Required | Description |
+|----------------|----------------------------|----------|---------------------------------------|
+| `dateString` | `string` | Yes | The date string to parse |
+| `formatString` | `string \| CompiledObject` | Yes | The format pattern or compiled object |
+| `options` | `ParserOptions` | No | Parser options for customization |
### Returns
@@ -51,72 +51,74 @@ parse('2025-08-23 14:30:45', 'YYYY-MM-DD HH:mm:ss');
### Date Tokens
-| Token | Description | Input Examples |
-|-------|-------------|----------------|
-| `YYYY` | 4-digit year | 0999, 2015 |
-| `Y` | Year without zero padding | 2, 44, 888, 2015 |
-| `MMMM` | Full month name | January, December |
-| `MMM` | Short month name | Jan, Dec |
-| `MM` | Month (01-12) | 01, 12 |
-| `M` | Month without zero padding | 1, 12 |
-| `DD` | Day (01-31) | 02, 31 |
-| `D` | Day without zero padding | 2, 31 |
+| Token | Description | Input Examples |
+|--------|----------------------------|-------------------|
+| `YYYY` | 4-digit year | 0999, 2015 |
+| `Y` | Year without zero padding | 2, 44, 888, 2015 |
+| `MMMM` | Full month name | January, December |
+| `MMM` | Short month name | Jan, Dec |
+| `MM` | Month (01-12) | 01, 12 |
+| `M` | Month without zero padding | 1, 12 |
+| `DD` | Day (01-31) | 02, 31 |
+| `D` | Day without zero padding | 2, 31 |
### Time Tokens
-| Token | Description | Input Examples |
-|-------|-------------|----------------|
-| `HH` | Hour in 24-hour format | 23, 08 |
-| `H` | Hour in 24-hour format without zero padding | 23, 8 |
-| `hh` | Hour in 12-hour format | 11, 08 |
-| `h` | Hour in 12-hour format without zero padding | 11, 8 |
-| `mm` | Minutes | 14, 07 |
-| `m` | Minutes without zero padding | 14, 7 |
-| `ss` | Seconds | 05, 10 |
-| `s` | Seconds without zero padding | 5, 10 |
-| `SSS` | 3-digit milliseconds | 753, 022 |
-| `SS` | 2-digit milliseconds | 75, 02 |
-| `S` | 1-digit milliseconds | 7, 0 |
+| Token | Description | Input Examples |
+|-------|---------------------------------------------|----------------|
+| `HH` | Hour in 24-hour format | 23, 08 |
+| `H` | Hour in 24-hour format without zero padding | 23, 8 |
+| `hh` | Hour in 12-hour format | 11, 08 |
+| `h` | Hour in 12-hour format without zero padding | 11, 8 |
+| `mm` | Minutes | 14, 07 |
+| `m` | Minutes without zero padding | 14, 7 |
+| `ss` | Seconds | 05, 10 |
+| `s` | Seconds without zero padding | 5, 10 |
+| `SSS` | 3-digit milliseconds | 753, 022 |
+| `SS` | 2-digit milliseconds | 75, 02 |
+| `S` | 1-digit milliseconds | 7, 0 |
### AM/PM Tokens
-| Token | Description | Input Examples |
-|-------|-------------|----------------|
-| `A` | Uppercase AM/PM | AM, PM |
-| `AA` | Uppercase AM/PM (with periods) | A.M., P.M. |
-| `a` | Lowercase AM/PM | am, pm |
-| `aa` | Lowercase AM/PM (with periods) | a.m., p.m. |
+| Token | Description | Input Examples |
+|-------|--------------------------------|----------------|
+| `A` | Uppercase AM/PM | AM, PM |
+| `AA` | Uppercase AM/PM (with periods) | A.M., P.M. |
+| `a` | Lowercase AM/PM | am, pm |
+| `aa` | Lowercase AM/PM (with periods) | a.m., p.m. |
### Timezone Tokens
-| Token | Description | Input Examples |
-|-------|-------------|----------------|
-| `Z` | Timezone offset | +0100, -0800 |
-| `ZZ` | Timezone offset with colon | +01:00, -08:00 |
+| Token | Description | Input Examples |
+|-------|----------------------------|----------------|
+| `Z` | Timezone offset | +0100, -0800 |
+| `ZZ` | Timezone offset with colon | +01:00, -08:00 |
### Plugin Tokens
Additional tokens available with plugins:
-| Token | Description | Input Examples | Plugin Required |
-|-------|-------------|----------------|-----------------|
-| `YY` | 2-digit year | 90, 00, 08, 19 | two-digit-year |
-| `DDD` | Ordinal representation | 1st, 2nd, 3rd | ordinal |
-| `dddd` | Full day name | Friday, Sunday | day-of-week |
-| `ddd` | Short day name | Fri, Sun | day-of-week |
-| `dd` | Very short day name | Fr, Su | day-of-week |
-| `SSSSSS` | 6-digit milliseconds | 123456, 000001 | microsecond |
-| `SSSSS` | 5-digit milliseconds | 12345, 00001 | microsecond |
-| `SSSS` | 4-digit milliseconds | 1234, 0001 | microsecond |
-| `fff` | 3-digit microseconds | 753, 022 | microsecond |
-| `ff` | 2-digit microseconds | 75, 02 | microsecond |
-| `f` | 1-digit microseconds | 7, 0 | microsecond |
-| `SSSSSSSSS` | 9-digit milliseconds | 123456789, 000000001 | nanosecond |
-| `SSSSSSSS` | 8-digit milliseconds | 12345678, 00000001 | nanosecond |
-| `SSSSSSS` | 7-digit milliseconds | 1234567, 0000001 | nanosecond |
-| `FFF` | 3-digit nanoseconds | 753, 022 | nanosecond |
-| `FF` | 2-digit nanoseconds | 75, 02 | nanosecond |
-| `F` | 1-digit nanoseconds | 7, 0 | nanosecond |
+| Token | Description | Input Examples | Plugin Required |
+|-------------|------------------------|----------------------|-----------------|
+| `YY` | 2-digit year | 90, 00, 08, 19 | two-digit-year |
+| `DDD` | Ordinal representation | 1st, 2nd, 3rd | ordinal |
+| `dddd` | Full day name | Friday, Sunday | day-of-week |
+| `ddd` | Short day name | Fri, Sun | day-of-week |
+| `dd` | Very short day name | Fr, Su | day-of-week |
+| `SSSSSS` | 6-digit milliseconds | 123456, 000001 | microsecond |
+| `SSSSS` | 5-digit milliseconds | 12345, 00001 | microsecond |
+| `SSSS` | 4-digit milliseconds | 1234, 0001 | microsecond |
+| `fff` | 3-digit microseconds | 753, 022 | microsecond |
+| `ff` | 2-digit microseconds | 75, 02 | microsecond |
+| `f` | 1-digit microseconds | 7, 0 | microsecond |
+| `SSSSSSSSS` | 9-digit milliseconds | 123456789, 000000001 | nanosecond |
+| `SSSSSSSS` | 8-digit milliseconds | 12345678, 00000001 | nanosecond |
+| `SSSSSSS` | 7-digit milliseconds | 1234567, 0000001 | nanosecond |
+| `FFF` | 3-digit nanoseconds | 753, 022 | nanosecond |
+| `FF` | 2-digit nanoseconds | 75, 02 | nanosecond |
+| `F` | 1-digit nanoseconds | 7, 0 | nanosecond |
+
+For available plugins, see the [`plugins`](#plugins) option in ParserOptions.
## ParserOptions
@@ -140,7 +142,7 @@ For a complete list of all supported locales with import examples, see [Supporte
### timeZone
-**Type**: `TimeZone | string`
+**Type**: `TimeZone | string`
**Default**: `undefined` (local timezone)
Interprets the parsed date in the specified timezone.
@@ -149,18 +151,8 @@ Interprets the parsed date in the specified timezone.
```typescript
import { parse } from 'date-and-time';
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
-import New_York from 'date-and-time/timezones/America/New_York';
-// Parse in Tokyo timezone
-parse('2025-08-23 14:30:00', 'YYYY-MM-DD HH:mm:ss', { timeZone: Tokyo });
-// => Fri Aug 23 2025 14:30:00 GMT+0900
-
-// Parse in New York timezone
-parse('2025-08-23 14:30:00', 'YYYY-MM-DD HH:mm:ss', { timeZone: New_York });
-// => Fri Aug 23 2025 14:30:00 GMT-0400
-
-// Parse using an IANA timezone name string (no import needed)
+// Parse using an IANA timezone name string
parse('2025-08-23 14:30:00', 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Asia/Tokyo' });
// => Fri Aug 23 2025 14:30:00 GMT+0900
@@ -169,18 +161,14 @@ parse('2025-08-23 14:30:00', 'YYYY-MM-DD HH:mm:ss', { timeZone: 'UTC' });
// => Fri Aug 23 2025 14:30:00 GMT+0000
// Timezone offset in input takes precedence over timeZone option
-parse('2025-08-23 14:30:00 +0300', 'YYYY-MM-DD HH:mm:ss Z', { timeZone: Tokyo });
-// => Fri Aug 23 2025 14:30:00 GMT+0300 (Tokyo timeZone is ignored)
+parse('2025-08-23 14:30:00 +0300', 'YYYY-MM-DD HH:mm:ss Z', { timeZone: 'Asia/Tokyo' });
+// => Fri Aug 23 2025 14:30:00 GMT+0300 (Asia/Tokyo timeZone is ignored)
-parse('2025-08-23T14:30:00 +05:00', 'YYYY-MM-DD[T]HH:mm:ss ZZ', { timeZone: New_York });
-// => Fri Aug 23 2025 14:30:00 GMT+0500 (New_York timeZone is ignored)
+parse('2025-08-23T14:30:00 +05:00', 'YYYY-MM-DD[T]HH:mm:ss ZZ', { timeZone: 'America/New_York' });
+// => Fri Aug 23 2025 14:30:00 GMT+0500 (America/New_York timeZone is ignored)
```
-:::tip
-Like `format()`, `parse()` accepts TimeZone objects, IANA timezone name strings (e.g., `'America/New_York'`), and the `"UTC"` string for the `timeZone` option. If the input string contains a timezone offset token (`Z` or `ZZ`), that offset takes precedence over the `timeZone` option.
-:::
-
-For a complete list of all supported timezones with import examples, see [Supported Timezones](../timezones).
+For a complete list of all supported timezones, see [Supported Timezones](../timezones).
### numeral
@@ -470,12 +458,11 @@ parse('Log entry: 2025-08-23 some extra data here', '[Log entry: ]YYYY-MM-DD...'
```typescript
import { parse } from 'date-and-time';
import fr from 'date-and-time/locales/fr';
-import Paris from 'date-and-time/timezones/Europe/Paris';
// French with timezone
parse('samedi, 23 août 2025 à 14:30:45', 'dddd, D MMMM YYYY [à] HH:mm:ss', {
locale: fr,
- timeZone: Paris
+ timeZone: 'Europe/Paris'
});
// => Fri Aug 23 2025 14:30:45 GMT+0200
```
diff --git a/docs/api/preparse.md b/docs/api/preparse.md
index 5706a50..9975f32 100644
--- a/docs/api/preparse.md
+++ b/docs/api/preparse.md
@@ -10,11 +10,11 @@ preparse(dateString, formatString[, options])
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateString` | `string` | Yes | The date string to parse |
-| `formatString` | `string \| CompiledObject` | Yes | Format pattern string or compiled object |
-| `options` | `ParserOptions` | No | Parsing options for customization (see [`parse()`](./parse) for details) |
+| Parameter | Type | Required | Description |
+|----------------|----------------------------|----------|--------------------------------------------------------------------------|
+| `dateString` | `string` | Yes | The date string to parse |
+| `formatString` | `string \| CompiledObject` | Yes | Format pattern string or compiled object |
+| `options` | `ParserOptions` | No | Parsing options for customization (see [`parse()`](./parse) for details) |
### Returns
diff --git a/docs/api/subtract.md b/docs/api/subtract.md
index 6d390a7..685806b 100644
--- a/docs/api/subtract.md
+++ b/docs/api/subtract.md
@@ -10,10 +10,10 @@ subtract(date1, date2)
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `date1` | `Date` | Yes | The earlier/start date |
-| `date2` | `Date` | Yes | The later/end date |
+| Parameter | Type | Required | Description |
+|-----------|--------|----------|------------------------|
+| `date1` | `Date` | Yes | The earlier/start date |
+| `date2` | `Date` | Yes | The later/end date |
### Returns
diff --git a/docs/api/transform.md b/docs/api/transform.md
index 4ebc42d..0a53fa8 100644
--- a/docs/api/transform.md
+++ b/docs/api/transform.md
@@ -10,13 +10,13 @@ transform(dateString, sourceFormat, targetFormat[, parserOptions, formatterOptio
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `dateString` | `string` | Yes | The input date string to transform |
-| `sourceFormat` | `string \| CompiledObject` | Yes | Source format pattern or compiled pattern |
-| `targetFormat` | `string \| CompiledObject` | Yes | Target format pattern or compiled pattern |
-| `parserOptions` | `ParserOptions` | No | Options for parsing the source string |
-| `formatterOptions` | `FormatterOptions` | No | Options for formatting the target string |
+| Parameter | Type | Required | Description |
+|--------------------|----------------------------|----------|-------------------------------------------|
+| `dateString` | `string` | Yes | The input date string to transform |
+| `sourceFormat` | `string \| CompiledObject` | Yes | Source format pattern or compiled pattern |
+| `targetFormat` | `string \| CompiledObject` | Yes | Target format pattern or compiled pattern |
+| `parserOptions` | `ParserOptions` | No | Options for parsing the source string |
+| `formatterOptions` | `FormatterOptions` | No | Options for formatting the target string |
### Returns
diff --git a/docs/api/utils/getDaysInMonth.md b/docs/api/utils/getDaysInMonth.md
new file mode 100644
index 0000000..90ec2fc
--- /dev/null
+++ b/docs/api/utils/getDaysInMonth.md
@@ -0,0 +1,50 @@
+# getDaysInMonth()
+
+Returns the number of days in a given month of a specific year. Correctly handles leap years when calculating February.
+
+## Syntax
+
+```typescript
+getDaysInMonth(date)
+getDaysInMonth(year, month)
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+|-----------|----------|------------------|----------------------------------------|
+| `date` | `Date` | Yes (overload 1) | The date object whose month to examine |
+| `year` | `number` | Yes (overload 2) | The Gregorian year (1–9999) |
+| `month` | `number` | Yes (overload 2) | The month (1–12) |
+
+### Returns
+
+`number` - The number of days in the specified month
+
+## Basic Examples
+
+### Using a Date Object
+
+```typescript
+import { getDaysInMonth } from 'date-and-time';
+
+getDaysInMonth(new Date(2024, 1, 1)); // => 29 (Feb 2024, leap year)
+getDaysInMonth(new Date(2023, 1, 1)); // => 28 (Feb 2023, not a leap year)
+getDaysInMonth(new Date(2025, 0, 1)); // => 31 (January 2025)
+```
+
+### Using Year and Month Numbers
+
+```typescript
+import { getDaysInMonth } from 'date-and-time';
+
+getDaysInMonth(2024, 2); // => 29 (Feb 2024, leap year)
+getDaysInMonth(2023, 2); // => 28 (Feb 2023, not a leap year)
+getDaysInMonth(2025, 4); // => 30 (April 2025)
+getDaysInMonth(2025, 12); // => 31 (December 2025)
+```
+
+## See Also
+
+- [`isLeapYear()`](./isLeapYear) - Check if a year is a leap year
+- [`addMonths()`](../addMonths) - Add months to a date
diff --git a/docs/api/utils/getISOWeek.md b/docs/api/utils/getISOWeek.md
new file mode 100644
index 0000000..36c99e2
--- /dev/null
+++ b/docs/api/utils/getISOWeek.md
@@ -0,0 +1,59 @@
+# getISOWeek()
+
+Returns the ISO 8601 week number (1–53) for a given date. ISO weeks start on Monday, and week 1 is the week containing the first Thursday of the year.
+
+## Syntax
+
+```typescript
+getISOWeek(date)
+getISOWeek(year, month, day)
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+|-----------|----------|------------------|-----------------------------|
+| `date` | `Date` | Yes (overload 1) | The date object to examine |
+| `year` | `number` | Yes (overload 2) | The Gregorian year (1–9999) |
+| `month` | `number` | Yes (overload 2) | The month (1–12) |
+| `day` | `number` | Yes (overload 2) | The day (1–31) |
+
+### Returns
+
+`number` - The ISO week number (1–53) for the given date
+
+## Basic Examples
+
+### Using a Date Object
+
+```typescript
+import { getISOWeek } from 'date-and-time';
+
+getISOWeek(new Date(2025, 0, 1)); // => 1 (Jan 1, 2025 is in week 1)
+getISOWeek(new Date(2025, 5, 15)); // => 24 (Jun 15, 2025 is in week 24)
+```
+
+### Using Year, Month, and Day
+
+```typescript
+import { getISOWeek } from 'date-and-time';
+
+getISOWeek(2025, 1, 1); // => 1
+getISOWeek(2025, 6, 15); // => 24
+```
+
+### Years with Week 53
+
+Some years have 53 ISO weeks (when January 1 is a Thursday, or a Wednesday in a leap year):
+
+```typescript
+import { getISOWeek } from 'date-and-time';
+
+getISOWeek(new Date(2020, 11, 31)); // => 53 (Dec 31, 2020)
+getISOWeek(2020, 12, 31); // => 53
+```
+
+## See Also
+
+- [`getISOWeekYear()`](./getISOWeekYear) - Get the ISO week year for a date
+- [week plugin](../../plugins#week) - Format ISO week dates with `format()`
diff --git a/docs/api/utils/getISOWeekYear.md b/docs/api/utils/getISOWeekYear.md
new file mode 100644
index 0000000..8dee41f
--- /dev/null
+++ b/docs/api/utils/getISOWeekYear.md
@@ -0,0 +1,54 @@
+# getISOWeekYear()
+
+Returns the ISO 8601 week year for a given date. The ISO week year may differ from the calendar year near the start and end of the year, because ISO weeks always start on Monday and the first week of the year is the one containing the first Thursday of the year.
+
+## Syntax
+
+```typescript
+getISOWeekYear(date)
+getISOWeekYear(year, month, day)
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+|-----------|----------|------------------|-----------------------------|
+| `date` | `Date` | Yes (overload 1) | The date object to examine |
+| `year` | `number` | Yes (overload 2) | The Gregorian year (1–9999) |
+| `month` | `number` | Yes (overload 2) | The month (1–12) |
+| `day` | `number` | Yes (overload 2) | The day (1–31) |
+
+### Returns
+
+`number` - The ISO week year corresponding to the given date
+
+## Basic Examples
+
+### Using a Date Object
+
+```typescript
+import { getISOWeekYear } from 'date-and-time';
+
+getISOWeekYear(new Date(2025, 5, 15)); // => 2025 (mid-year, same as calendar year)
+```
+
+### Year Boundary Cases
+
+Near year boundaries, the ISO week year can differ from the calendar year:
+
+```typescript
+import { getISOWeekYear } from 'date-and-time';
+
+// Dec 30, 2024 is in ISO week 1 of 2025
+getISOWeekYear(new Date(2024, 11, 30)); // => 2025
+getISOWeekYear(2024, 12, 30); // => 2025
+
+// Jan 1, 2016 is in ISO week 53 of 2015
+getISOWeekYear(new Date(2016, 0, 1)); // => 2015
+getISOWeekYear(2016, 1, 1); // => 2015
+```
+
+## See Also
+
+- [`getISOWeek()`](./getISOWeek) - Get the ISO week number for a date
+- [week plugin](../../plugins#week) - Format ISO week dates with `format()`
diff --git a/docs/api/isLeapYear.md b/docs/api/utils/isLeapYear.md
similarity index 90%
rename from docs/api/isLeapYear.md
rename to docs/api/utils/isLeapYear.md
index 86ef7fc..bccb520 100644
--- a/docs/api/isLeapYear.md
+++ b/docs/api/utils/isLeapYear.md
@@ -10,9 +10,9 @@ isLeapYear(year)
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `year` | `number` | Yes | The year to check |
+| Parameter | Type | Required | Description |
+|-----------|----------|----------|-------------------|
+| `year` | `number` | Yes | The year to check |
### Returns
diff --git a/docs/api/isSameDay.md b/docs/api/utils/isSameDay.md
similarity index 81%
rename from docs/api/isSameDay.md
rename to docs/api/utils/isSameDay.md
index 7dd4738..ed0af6b 100644
--- a/docs/api/isSameDay.md
+++ b/docs/api/utils/isSameDay.md
@@ -10,10 +10,10 @@ isSameDay(date1, date2)
### Parameters
-| Parameter | Type | Required | Description |
-|-----------|------|----------|-------------|
-| `date1` | `Date` | Yes | The first Date object to compare |
-| `date2` | `Date` | Yes | The second Date object to compare |
+| Parameter | Type | Required | Description |
+|-----------|--------|----------|-----------------------------------|
+| `date1` | `Date` | Yes | The first Date object to compare |
+| `date2` | `Date` | Yes | The second Date object to compare |
### Returns
diff --git a/docs/guide/index.md b/docs/guide/index.md
index 425d1b3..90323e2 100644
--- a/docs/guide/index.md
+++ b/docs/guide/index.md
@@ -53,6 +53,9 @@
- **`isLeapYear()`** - Check if a year is a leap year
- **`isSameDay()`** - Check if two dates are on the same day
+- **`getDaysInMonth()`** - Get the number of days in a month
+- **`getISOWeekYear()`** - Get the ISO week year for a date (follows ISO 8601)
+- **`getISOWeek()`** - Get the ISO week number for a date (1–53, follows ISO 8601)
### Advanced Features
@@ -87,7 +90,6 @@ Version 4.x represents a complete rewrite with significant improvements:
```typescript
import { format, parse } from 'date-and-time';
import ja from 'date-and-time/locales/ja';
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
// Core functionality
const date = new Date();
@@ -97,9 +99,7 @@ const formatted = format(date, 'YYYY/MM/DD');
const localized = format(date, 'YYYY年M月D日', { locale: ja });
// Timezone-aware operations
-const tokyoTime = format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: Tokyo });
-// Or using IANA timezone name string (New in v4.2.0)
-const tokyoTime2 = format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Asia/Tokyo' });
+const tokyoTime = format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Asia/Tokyo' });
```
## Browser and Environment Support
@@ -113,11 +113,11 @@ const tokyoTime2 = format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Asia/Tokyo'
### Browsers
| Browser | Minimum Version |
-|---------|----------------|
-| Chrome | 85+ |
-| Firefox | 78+ |
-| Safari | 14+ |
-| Edge | 85+ |
+|---------|-----------------|
+| Chrome | 85+ |
+| Firefox | 78+ |
+| Safari | 14+ |
+| Edge | 85+ |
### Module Systems
diff --git a/docs/guide/installation.md b/docs/guide/installation.md
index cff1fd7..07b3416 100644
--- a/docs/guide/installation.md
+++ b/docs/guide/installation.md
@@ -74,20 +74,16 @@ format(new Date(), 'D MMMM YYYY', { locale: fr });
For a complete list of all supported locales with import examples, see [Supported Locales](../locales).
-### Timezone Imports
+### Timezone Usage
+
+Pass an IANA timezone name string directly to any function that accepts a timezone option:
```typescript
-// Import specific timezones
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
-import New_York from 'date-and-time/timezones/America/New_York';
-import London from 'date-and-time/timezones/Europe/London';
-
-// Use in operations
-format(new Date(), 'YYYY-MM-DD HH:mm:ss', { timeZone: Tokyo });
-format(new Date(), 'YYYY-MM-DD HH:mm:ss', { timeZone: New_York });
+format(new Date(), 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Asia/Tokyo' });
+format(new Date(), 'YYYY-MM-DD HH:mm:ss', { timeZone: 'America/New_York' });
```
-For a complete list of all supported timezones with import examples, see [Supported Timezones](../timezones).
+For a complete list of all supported timezones, see [Supported Timezones](../timezones).
### Numeral Systems
@@ -120,12 +116,12 @@ format(new Date(), 'HH:mm:ss.SSSSSS', { plugins: [microsecond] }); // with micro
For browser-only projects, you can use date-and-time directly from a CDN:
-### ES Modules via CDN
+### Via jsDelivr
```html
```
@@ -134,8 +130,8 @@ For browser-only projects, you can use date-and-time directly from a CDN:
```html
```
diff --git a/docs/guide/quick-start.md b/docs/guide/quick-start.md
index 252228e..5f0a0d8 100644
--- a/docs/guide/quick-start.md
+++ b/docs/guide/quick-start.md
@@ -84,24 +84,9 @@ For a complete list of all supported locales with import examples, see [Supporte
```typescript
import { format, parse } from 'date-and-time';
-// Method 1: Individual timezone imports
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
-import New_York from 'date-and-time/timezones/America/New_York';
-
-// Method 2: Consolidated timezone imports (alternative)
-import { Los_Angeles, London } from 'date-and-time/timezone';
-
const date = new Date();
-// Using TimeZone objects (Method 1 - individual import)
-format(date, 'YYYY-MM-DD HH:mm:ss [JST]', { timeZone: Tokyo });
-// => 2025-08-23 23:30:45 JST
-
-// Using TimeZone objects (Method 2 - consolidated import)
-format(date, 'YYYY-MM-DD HH:mm:ss [PST]', { timeZone: Los_Angeles });
-// => 2025-08-23 06:30:45 PST
-
-// Using IANA timezone name strings (simplest approach)
+// Format in a specific timezone
format(date, 'YYYY-MM-DD HH:mm:ss [EST]', { timeZone: 'America/New_York' });
// => 2025-08-23 09:30:45 EST
@@ -109,26 +94,12 @@ format(date, 'YYYY-MM-DD HH:mm:ss [EST]', { timeZone: 'America/New_York' });
format(date, 'YYYY-MM-DD HH:mm:ss [UTC]', { timeZone: 'UTC' });
// => 2025-08-23 14:30:45 UTC
-// Parsing in timezone (TimeZone object)
-parse('2025-08-23 23:30:45', 'YYYY-MM-DD HH:mm:ss', { timeZone: Tokyo });
-// => Fri Aug 23 2025 23:30:45 GMT+0900
-
-// Parsing in timezone (IANA timezone name string)
+// Parsing in timezone
parse('2025-08-23 23:30:45', 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Asia/Tokyo' });
// => Fri Aug 23 2025 23:30:45 GMT+0900
```
-### Three Ways to Specify Timezones
-
-The `format()` function supports three methods for specifying timezones:
-
-1. **TimeZone objects via individual imports** - Type-safe but requires multiple import statements
-2. **TimeZone objects via consolidated imports** - Type-safe with better code organization
-3. **IANA timezone name strings** - Simplest approach, no imports needed for timezone modules
-
-The `parse()` function supports the same timezone formats as `format()`: TimeZone objects, IANA timezone name strings, and the `"UTC"` string.
-
-For a complete list of all supported timezones with import examples, see [Supported Timezones](../timezones).
+For a complete list of all supported timezones, see [Supported Timezones](../timezones).
## Date Arithmetic
diff --git a/docs/index.md b/docs/index.md
index b6133dc..fcc56eb 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -50,7 +50,6 @@ features:
```typescript
import { format, parse, addDays } from 'date-and-time';
import ja from 'date-and-time/locales/ja';
-import { Tokyo } from 'date-and-time/timezone';
const now = new Date();
@@ -62,11 +61,7 @@ format(now, 'YYYY/MM/DD HH:mm:ss');
format(now, 'YYYY年M月D日(ddd)', { locale: ja });
// => 2025年8月23日(金)
-// Timezone-aware formatting (using TimeZone object)
-format(now, 'YYYY-MM-DD HH:mm:ss [JST]', { timeZone: Tokyo });
-// => 2025-08-23 23:30:45 JST
-
-// Timezone-aware formatting (using IANA timezone name string)
+// Timezone-aware formatting
format(now, 'YYYY-MM-DD HH:mm:ss [EST]', { timeZone: 'America/New_York' });
// => 2025-08-23 09:30:45 EST
diff --git a/docs/migration.md b/docs/migration.md
index 559d61c..1a79bdb 100644
--- a/docs/migration.md
+++ b/docs/migration.md
@@ -6,7 +6,7 @@ Version `4.x` has been completely rewritten in TypeScript and some features from
Version `4.x` adopts a modern development style and no longer supports older browsers. Module imports are only supported in ES Modules or CommonJS style. Additionally, since functions can now be imported directly, it is more likely to reduce the final module size through bundler tree shaking.
-- ES Modules:
+### ES Modules (Recommended)
```typescript
import { format } from 'date-and-time';
@@ -15,7 +15,7 @@ format(new Date(), 'ddd, MMM DD YYYY');
// => Wed, Jul 09 2025
```
-- CommonJS:
+### CommonJS
```typescript
const { format } = require('date-and-time');
@@ -24,80 +24,54 @@ format(new Date(), 'ddd, MMM DD YYYY');
// => Wed, Jul 09 2025
```
-## API
+## CDN Usage
-### format
+For browser-only projects, you can use date-and-time directly from a CDN:
-The third argument has been changed from `boolean` to `FormatterOptions`. With `FormatterOptions`, you can now specify timezone and locale settings. If you previously set the third argument to `true` to output in UTC timezone, you can achieve the same output as follows:
+### Via jsDelivr
-```typescript
-import { format } from 'date-and-time';
+```html
+
```
-Additionally, since the `timezone` plugin has been integrated into the main library, the `formatTZ` function is now obsolete. In v4.0/4.1, timezones must be imported as TimeZone objects from timezone modules. IANA timezone name strings are not supported in this version (except for UTC timezone).
+### Via unpkg
-```typescript
-import { format } from 'date-and-time';
-import New_York from 'date-and-time/timezones/America/New_York';
+```html
+
```
-#### New in v4.2.0: Enhanced Timezone Support
+## API
-In addition to TimeZone objects, the `format()` function now supports specifying timezones using IANA timezone name strings. This provides flexibility in how you work with timezones:
+### format
+
+The third argument has been changed from `boolean` to `FormatterOptions`. With `FormatterOptions`, you can now specify timezone and locale settings. If you previously set the third argument to `true` to output in UTC timezone, you can achieve the same output as follows:
```typescript
import { format } from 'date-and-time';
-const now = new Date();
-
-// Using IANA timezone name string (simplest)
-format(now, 'YYYY-MM-DD HH:mm:ss [EST]', { timeZone: 'America/New_York' });
-// => 2025-08-23 09:30:45 EST
-
-// Using TimeZone object (recommended for type safety)
-import New_York from 'date-and-time/timezones/America/New_York';
-format(now, 'YYYY-MM-DD HH:mm:ss [EST]', { timeZone: New_York });
-// => 2025-08-23 09:30:45 EST
-
-// Using consolidated import (recommended for multiple timezones)
-import { New_York as NY } from 'date-and-time/timezone';
-format(now, 'YYYY-MM-DD HH:mm:ss [EST]', { timeZone: NY });
-// => 2025-08-23 09:30:45 EST
+format(new Date(), 'ddd, MMM DD YYYY hh:mm A [GMT]Z', { timeZone: 'UTC' });
+// => Fri, Jan 02 2015 07:14 AM GMT+0000
```
-##### Consolidated Import
-
-For better code organization when working with multiple timezones, you can import all timezones from a single `date-and-time/timezone` module:
+Additionally, since the `timezone` plugin has been integrated into the main library, the `formatTZ` function is now obsolete. Pass an IANA timezone name string directly to the `timeZone` option:
```typescript
-// Consolidated import (recommended for multiple timezones)
-import { Tokyo, New_York, London, Sydney } from 'date-and-time/timezone';
+import { format } from 'date-and-time';
const now = new Date();
-format(now, 'YYYY-MM-DD HH:mm', { timeZone: Tokyo }); // JST
-format(now, 'YYYY-MM-DD HH:mm', { timeZone: New_York }); // EST/EDT
-format(now, 'YYYY-MM-DD HH:mm', { timeZone: London }); // GMT/BST
-format(now, 'YYYY-MM-DD HH:mm', { timeZone: Sydney }); // AEDT/AEST
-```
-
-Alternatively, you can still import individual timezone modules directly:
-
-```typescript
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
-import New_York from 'date-and-time/timezones/America/New_York';
-import London from 'date-and-time/timezones/Europe/London';
-import Sydney from 'date-and-time/timezones/Australia/Sydney';
+format(now, 'YYYY-MM-DD HH:mm:ss [EST]', { timeZone: 'America/New_York' });
+// => 2025-08-23 09:30:45 EST
```
-> **Note**: The TimeZone module import approach (individual imports and consolidated imports) may be deprecated in a future version in favor of IANA timezone name strings. Using IANA timezone name strings is recommended for new projects.
-
### parse
The third argument has been changed from `boolean` to `ParserOptions`. With `ParserOptions`, you can now specify timezone and locale settings. If you previously set the third argument to `true` to parse input in UTC timezone, you can achieve the same output as follows:
@@ -109,23 +83,7 @@ parse('11:14:05 PM', 'h:mm:ss A', { timeZone: 'UTC' });
// => Jan 02 1970 23:14:05 GMT+0000
```
-Additionally, since the `timezone` plugin has been integrated into the main library, the `parseTZ` function is now obsolete. Timezones can now be specified as TimeZone module imports, IANA timezone name strings, or the `"UTC"` string.
-
-```typescript
-import { parse } from 'date-and-time';
-import Paris from 'date-and-time/timezones/Europe/Paris';
-import fr from 'date-and-time/locales/fr';
-
-parse(
- '02 janv. 2015, 11:14:05 PM', 'DD MMM YYYY, h:mm:ss A',
- { timeZone: Paris, locale: fr }
-);
-// => Jan 02 2015 23:14:05 GMT+0100
-```
-
-#### New in v4.3.0: Enhanced Timezone Support
-
-The `parse()` function now also supports IANA timezone name strings (e.g., `'America/New_York'`), in addition to TimeZone objects and the `"UTC"` string.
+Additionally, since the `timezone` plugin has been integrated into the main library, the `parseTZ` function is now obsolete. Pass an IANA timezone name string directly to the `timeZone` option:
```typescript
import { parse } from 'date-and-time';
@@ -184,33 +142,12 @@ The fourth argument has been changed from `boolean` to `FormatterOptions`. With
```typescript
import { transform } from 'date-and-time';
-import New_York from 'date-and-time/timezones/America/New_York';
-import Los_Angeles from 'date-and-time/timezones/America/Los_Angeles';
// Convert 24-hour format to 12-hour format
transform('13:05', 'HH:mm', 'hh:mm A', { timeZone: 'UTC' }, { timeZone: 'UTC' });
// => 01:05 PM
// Convert East Coast time to West Coast time
-transform(
- '3/8/2020 1:05 PM', 'D/M/YYYY h:mm A', 'D/M/YYYY h:mm A',
- { timeZone: New_York }, { timeZone: Los_Angeles }
-);
-// => 3/8/2020 10:05 AM
-```
-
-#### New in v4.3.0: Enhanced Timezone Support
-
-The `transform()` function now supports IANA timezone name strings for both `parserOptions` and `formatterOptions`. Using IANA timezone name strings is recommended over importing TimeZone modules.
-
-```typescript
-import { transform } from 'date-and-time';
-
-// Convert 24-hour format to 12-hour format
-transform('13:05', 'HH:mm', 'hh:mm A', { timeZone: 'UTC' }, { timeZone: 'UTC' });
-// => 01:05 PM
-
-// Convert East Coast time to West Coast time using IANA timezone name strings
transform(
'3/8/2020 1:05 PM', 'D/M/YYYY h:mm A', 'D/M/YYYY h:mm A',
{ timeZone: 'America/New_York' }, { timeZone: 'America/Los_Angeles' }
@@ -232,21 +169,7 @@ addYears(now, 1, 'UTC');
// => Mar 11 2025 01:00:00 GMT+0000
```
-Additionally, since the `timezone` plugin has been integrated into the main library, the `addYearsTZ` function is now obsolete. Timezones are now imported as modules rather than using `IANA timezone names` (except for the UTC timezone).
-
-```typescript
-import Los_Angeles from 'date-and-time/timezones/America/Los_Angeles';
-
-const now = new Date(2024, 2, 11, 1);
-// => Mar 11 2024 01:00:00 GMT-07:00
-
-addYears(now, 1, Los_Angeles);
-// => Mar 11 2025 01:00:00 GMT-07:00
-```
-
-#### New in v4.3.0: Enhanced Timezone Support
-
-The `addYears()`, `addMonths()`, and `addDays()` functions now support IANA timezone name strings. Using IANA timezone name strings is recommended over importing TimeZone modules.
+Additionally, since the `timezone` plugin has been integrated into the main library, the `addYearsTZ` function is now obsolete. Pass an IANA timezone name string directly:
```typescript
import { addYears } from 'date-and-time';
diff --git a/docs/plugins.md b/docs/plugins.md
index 3c034b3..766b122 100644
--- a/docs/plugins.md
+++ b/docs/plugins.md
@@ -2,9 +2,9 @@
`date-and-time` adopts a plugin system. Special tokens used relatively infrequently are provided as plugins outside the main library. By adding plugins as needed, you can use those tokens in `Formatter` and `Parser`. Here, `Formatter` refers to the output engine used by the `format` function, and `Parser` refers to the parsing engine used by the `parse`, `preparse`, and `isValid` functions. These engines are extended by adding plugins as arguments to these functions.
-## Install
+## Installation
-- ESModules:
+### ESModules (Recommended)
```typescript
import { format } from 'date-and-time';
@@ -13,7 +13,7 @@ import { formatter as foobar } from 'date-and-time/plugins/foobar';
format(new Date(), 'ddd, MMM DD YYYY', { plugins: [foobar] });
```
-- CommonJS:
+### CommonJS
```typescript
const { format } = require('date-and-time');
@@ -22,20 +22,17 @@ const foobar = require('date-and-time/plugins/foobar');
format(new Date(), 'ddd, MMM DD YYYY', { plugins: [foobar.formatter] });
```
-## Plugin List
+## day-of-week
-
-day-of-week
+This plugin adds tokens to the `Parser` for reading the day of the week. Since the day of the week does not provide information that identifies a specific date, it is a meaningless token, but it can be used to skip that portion when the string you want to read contains a day of the week.
-You can add tokens to the `Parser` to read the day of the week. Since the day of the week does not provide information that identifies a specific date, it is a meaningless token, but it can be used to skip that portion when the string you want to read contains a day of the week.
+### Parser
-`Parser`:
-
-| Token | Meaning | Input Examples |
-|:---------|:-----------------------------------|:---------------|
-| dddd | Full day name | Friday, Sunday |
-| ddd | Short day name | Fri, Sun |
-| dd | Very short day name | Fr, Su |
+| Token | Meaning | Input Examples |
+|-------|---------------------|----------------|
+| dddd | Full day name | Friday, Sunday |
+| ddd | Short day name | Fri, Sun |
+| dd | Very short day name | Fr, Su |
```typescript
import { parse } from 'date-and-time';
@@ -47,23 +44,20 @@ parse(
);
```
-
-
-
-microsecond
+## microsecond
-You can add tokens to the `Parser` to read microseconds. Since the precision of JavaScript's Date type is milliseconds, these tokens are meaningless, but they can be used to skip that portion when the string you want to read contains microseconds.
+This plugin adds tokens to the `Parser` for reading microseconds. Since the precision of JavaScript's Date type is milliseconds, these tokens are meaningless, but they can be used to skip that portion when the string you want to read contains microseconds.
-`Parser`:
+### Parser
-| Token | Meaning | Input Examples |
-|:----------|:---------------------------------|:---------------|
-| SSSSSS | 6-digit milliseconds | 123456, 000001 |
-| SSSSS | 5-digit milliseconds | 12345, 00001 |
-| SSSS | 4-digit milliseconds | 1234, 0001 |
-| fff | 3-digit microseconds | 753, 022 |
-| ff | 2-digit microseconds | 75, 02 |
-| f | 1-digit microseconds | 7, 0 |
+| Token | Meaning | Input Examples |
+|--------|----------------------|----------------|
+| SSSSSS | 6-digit milliseconds | 123456, 000001 |
+| SSSSS | 5-digit milliseconds | 12345, 00001 |
+| SSSS | 4-digit milliseconds | 1234, 0001 |
+| fff | 3-digit microseconds | 753, 022 |
+| ff | 2-digit microseconds | 75, 02 |
+| f | 1-digit microseconds | 7, 0 |
```typescript
import { parse } from 'date-and-time';
@@ -73,23 +67,20 @@ parse('12:34:56.123456', 'HH:mm:ss.SSSSSS', { plugins: [microsecond] });
parse('12:34:56 123.456', 'HH:mm:ss SSS.fff', { plugins: [microsecond] });
```
-
+## nanosecond
-
-nanosecond
+This plugin adds tokens to the `Parser` for reading nanoseconds. Since the precision of JavaScript's Date type is milliseconds, these tokens are meaningless, but they can be used to skip that portion when the string you want to read contains nanoseconds.
-You can add tokens to the `Parser` to read nanoseconds. Since the precision of JavaScript's Date type is milliseconds, these tokens are meaningless, but they can be used to skip that portion when the string you want to read contains nanoseconds.
+### Parser
-`Parser`:
-
-| Token | Meaning | Input Examples |
-|:----------|:---------------------------------|:---------------------|
-| SSSSSSSSS | 9-digit milliseconds | 123456789, 000000001 |
-| SSSSSSSS | 8-digit milliseconds | 12345678, 00000001 |
-| SSSSSSS | 7-digit milliseconds | 1234567, 0000001 |
-| FFF | 3-digit nanoseconds | 753, 022 |
-| FF | 2-digit nanoseconds | 75, 02 |
-| F | 1-digit nanoseconds | 7, 0 |
+| Token | Meaning | Input Examples |
+|-----------|----------------------|----------------------|
+| SSSSSSSSS | 9-digit milliseconds | 123456789, 000000001 |
+| SSSSSSSS | 8-digit milliseconds | 12345678, 00000001 |
+| SSSSSSS | 7-digit milliseconds | 1234567, 0000001 |
+| FFF | 3-digit nanoseconds | 753, 022 |
+| FF | 2-digit nanoseconds | 75, 02 |
+| F | 1-digit nanoseconds | 7, 0 |
```typescript
import { parse } from 'date-and-time';
@@ -109,18 +100,15 @@ parse(
);
```
-
-
-
-ordinal
+## ordinal
-You can add tokens to the `Formatter` and `Parser` to output or read ordinal representations of days. This ordinal representation is limited to English and is not supported for locales other than English.
+This plugin adds tokens to the `Formatter` and `Parser` for outputting or reading ordinal representations of days. This ordinal representation is limited to English and is not supported for locales other than English.
-`Formatter`:
+### Formatter
-| Token | Meaning | Output Examples |
-|:----------|:---------------------------------|:---------------------|
-| DDD | Ordinal representation of day | 1st, 2nd, 3rd |
+| Token | Meaning | Output Examples |
+|-------|-------------------------------|-----------------|
+| DDD | Ordinal representation of day | 1st, 2nd, 3rd |
```typescript
import { format } from 'date-and-time';
@@ -130,11 +118,11 @@ format(new Date(), 'MMM DDD YYYY', { plugins: [ordinal] });
// => Jan 1st 2019
```
-`Parser`:
+### Parser
-| Token | Meaning | Input Examples |
-|:----------|:---------------------------------|:---------------------|
-| DDD | Ordinal representation of day | 1st, 2nd, 3rd |
+| Token | Meaning | Input Examples |
+|-------|-------------------------------|----------------|
+| DDD | Ordinal representation of day | 1st, 2nd, 3rd |
```typescript
import { parse } from 'date-and-time';
@@ -143,21 +131,59 @@ import { parser as ordinal } from 'date-and-time/plugins/ordinal';
parse('Jan 1st 2019', 'MMM DDD YYYY', { plugins: [ordinal] });
```
-
+## quarter
+
+This plugin adds a token to the `Formatter` for outputting the quarter of the year.
+
+### Formatter
+
+| Token | Meaning | Output Examples |
+|-------|-----------------|-----------------|
+| Q | Quarter of year | 1, 2, 3, 4 |
+
+```typescript
+import { format } from 'date-and-time';
+import { formatter as quarter } from 'date-and-time/plugins/quarter';
+
+format(new Date(2025, 0, 1), 'YYYY [Q]Q', { plugins: [quarter] });
+// => 2025 Q1
+format(new Date(2025, 9, 1), 'YYYY [Q]Q', { plugins: [quarter] });
+// => 2025 Q4
+```
+
+## timestamp
+
+This plugin adds tokens to the `Formatter` for outputting Unix timestamps.
-
-two-digit-year
+### Formatter
-You can add tokens to the `Parser` to read 2-digit years. This token identifies years based on the following rules:
+| Token | Meaning | Output Examples |
+|-------|-------------------------------|------------------|
+| t | Unix timestamp (seconds) | 0, 1000000000 |
+| T | Unix timestamp (milliseconds) | 0, 1000000000000 |
+
+```typescript
+import { format } from 'date-and-time';
+import { formatter as timestamp } from 'date-and-time/plugins/timestamp';
+
+format(new Date(1000000000000), 't', { plugins: [timestamp] });
+// => 1000000000
+format(new Date(1000000000000), 'T', { plugins: [timestamp] });
+// => 1000000000000
+```
+
+## two-digit-year
+
+This plugin adds tokens to the `Parser` for reading 2-digit years. This token identifies years based on the following rules:
- Values of 70 or above are interpreted as 1900s
- Values of 69 or below are interpreted as 2000s
-`Parser`:
+### Parser
-| Token | Meaning | Input Examples |
-|:----------|:---------------------------------|:---------------------|
-| YY | 2-digit year | 90, 00, 08, 19 |
+| Token | Meaning | Input Examples |
+|-------|--------------|----------------|
+| YY | 2-digit year | 90, 00, 08, 19 |
```typescript
import { parse } from 'date-and-time';
@@ -169,24 +195,48 @@ parse('Dec 25 70', 'MMM DD YY', { plugins: [two_digit_year] });
// => Dec 25 1970
```
-
+## week
+
+This plugin adds tokens to the `Formatter` for outputting ISO week dates. These tokens follow
+the ISO 8601 week date system, where weeks start on Monday and the first week of
+the year is the one that contains the first Thursday.
-
-zonename
+### Formatter
-You can add tokens to the `Formatter` to output timezone names. These timezone names are limited to English and are not supported for locales other than English.
+| Token | Meaning | Output Examples |
+|-------|-------------------------------------|-----------------|
+| W | ISO week number | 1, 27, 53 |
+| WW | ISO week number (zero-padded) | 01, 27, 53 |
+| G | ISO week year | 2024, 2025 |
+| GG | ISO week year (2-digit zero-padded) | 24, 25 |
+| GGGG | ISO week year (4-digit zero-padded) | 2024, 2025 |
-`Formatter`:
+```typescript
+import { format } from 'date-and-time';
+import { formatter as week } from 'date-and-time/plugins/week';
-| Token | Meaning | Output Examples |
-|:---------|:---------------------------------|:----------------------|
-| z | Short timezone name | PST, EST |
-| zz | Long timezone name | Pacific Standard Time |
+format(new Date(2024, 0, 1), 'GGGG-[W]WW', { plugins: [week] });
+// => 2024-W01
+
+// Note: Dec 30, 2024 belongs to ISO week year 2025
+format(new Date(2024, 11, 30), 'YYYY vs GGGG [W]W', { plugins: [week] });
+// => 2024 vs 2025 W1
+```
+
+## zonename
+
+This plugin adds tokens to the `Formatter` for outputting timezone names. These timezone names are limited to English and are not supported for locales other than English.
+
+### Formatter
+
+| Token | Meaning | Output Examples |
+|-------|---------------------|-----------------------|
+| z | Short timezone name | PST, EST |
+| zz | Long timezone name | Pacific Standard Time |
```typescript
import { format } from 'date-and-time';
import { formatter as zonename } from 'date-and-time/plugins/zonename';
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
format(
new Date(),
@@ -198,9 +248,7 @@ format(
format(
new Date(),
'MMMM DD YYYY H:mm z',
- { plugins: [zonename], timeZone: Tokyo }
+ { plugins: [zonename], timeZone: 'Asia/Tokyo' }
);
// March 14 2021 18:59 JST
```
-
-
diff --git a/docs/timezones.md b/docs/timezones.md
index 542abee..120a660 100644
--- a/docs/timezones.md
+++ b/docs/timezones.md
@@ -4,27 +4,32 @@
There are three ways to import and use timezones with the date-and-time library:
-### Method 1: Individual Import
+### Method 1: IANA Timezone Name String (Recommended)
-Import each timezone you need directly from its module path. This approach is useful when you only need a few specific timezones.
+Pass an IANA timezone name string directly to any function that accepts a timezone option. No imports are required — just use the timezone name as a string.
```typescript
import { format } from 'date-and-time';
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
-import New_York from 'date-and-time/timezones/America/New_York';
const date = new Date();
-format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: Tokyo });
+format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Asia/Tokyo' });
// => 2025-08-23 23:30:45
-format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: New_York });
+format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'America/New_York' });
// => 2025-08-23 09:30:45
+
+format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Europe/London' });
+// => 2025-08-23 14:30:45
```
-### Method 2: Consolidated Import
+The string `"UTC"` is treated specially by this library and is processed faster than other timezone strings. While other strings that represent UTC (e.g., `"Etc/UTC"`) are also recognized, using `"UTC"` is always recommended.
+
+### Method 2: Consolidated Import (Deprecated)
-Import multiple timezones from a single module using named imports. This approach is recommended when working with multiple timezones as it provides better code organization.
+**This approach is deprecated and will be removed in the next major version. Use IANA timezone name strings instead.**
+
+Import multiple timezones from a single module using named imports.
```typescript
import { format } from 'date-and-time';
@@ -38,32 +43,26 @@ format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: London }); // GMT/BST
format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: Sydney }); // AEDT/AEST
```
-Both Method 1 and Method 2 provide the same functionality - they differ only in code organization.
-
-> **Note**: The TimeZone module import approach (Method 1 and Method 2) may be deprecated in a future version. Switching to IANA timezone name strings (Method 3) is recommended for new projects.
+### Method 3: Individual Import (Deprecated)
-### Method 3: IANA Timezone Name String
+**This approach is deprecated and will be removed in the next major version. Use IANA timezone name strings instead.**
-All date-and-time functions that accept timezone options — `format()`, `parse()`, `preparse()`, `isValid()`, `transform()`, `addYears()`, `addMonths()`, and `addDays()` — support specifying timezones using IANA timezone name strings directly. This is the simplest approach and is recommended for new projects.
+Import each timezone you need directly from its module path.
```typescript
import { format } from 'date-and-time';
+import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
+import New_York from 'date-and-time/timezones/America/New_York';
const date = new Date();
-// Using IANA timezone name strings
-format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Asia/Tokyo' });
+format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: Tokyo });
// => 2025-08-23 23:30:45
-format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'America/New_York' });
+format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: New_York });
// => 2025-08-23 09:30:45
-
-format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Europe/London' });
-// => 2025-08-23 14:30:45
```
-**Note**: Starting from v4.3.0, all functions that accept a timezone parameter support IANA timezone name strings (e.g., `'America/New_York'`), TimeZone objects, and the `"UTC"` string.
-
## Regions
1. [Africa](#africa)
@@ -79,2536 +78,448 @@ format(date, 'YYYY-MM-DD HH:mm:ss', { timeZone: 'Europe/London' });
## Africa
-- Abidjan
-
-```typescript
-import Abidjan from 'date-and-time/timezones/Africa/Abidjan';
-```
-
-- Accra
-
-```typescript
-import Accra from 'date-and-time/timezones/Africa/Accra';
-```
-
-- Addis_Ababa
-
-```typescript
-import Addis_Ababa from 'date-and-time/timezones/Africa/Addis_Ababa';
-```
-
-- Algiers
-
-```typescript
-import Algiers from 'date-and-time/timezones/Africa/Algiers';
-```
-
-- Asmara
-
-```typescript
-import Asmara from 'date-and-time/timezones/Africa/Asmara';
-```
-
-- Bamako
-
-```typescript
-import Bamako from 'date-and-time/timezones/Africa/Bamako';
-```
-
-- Bangui
-
-```typescript
-import Bangui from 'date-and-time/timezones/Africa/Bangui';
-```
-
-- Banjul
-
-```typescript
-import Banjul from 'date-and-time/timezones/Africa/Banjul';
-```
-
-- Bissau
-
-```typescript
-import Bissau from 'date-and-time/timezones/Africa/Bissau';
-```
-
-- Blantyre
-
-```typescript
-import Blantyre from 'date-and-time/timezones/Africa/Blantyre';
-```
-
-- Brazzaville
-
-```typescript
-import Brazzaville from 'date-and-time/timezones/Africa/Brazzaville';
-```
-
-- Bujumbura
-
-```typescript
-import Bujumbura from 'date-and-time/timezones/Africa/Bujumbura';
-```
-
-- Cairo
-
-```typescript
-import Cairo from 'date-and-time/timezones/Africa/Cairo';
-```
-
-- Casablanca
-
-```typescript
-import Casablanca from 'date-and-time/timezones/Africa/Casablanca';
-```
-
-- Ceuta
-
-```typescript
-import Ceuta from 'date-and-time/timezones/Africa/Ceuta';
-```
-
-- Conakry
-
-```typescript
-import Conakry from 'date-and-time/timezones/Africa/Conakry';
-```
-
-- Dakar
-
-```typescript
-import Dakar from 'date-and-time/timezones/Africa/Dakar';
-```
-
-- Dar_es_Salaam
-
-```typescript
-import Dar_es_Salaam from 'date-and-time/timezones/Africa/Dar_es_Salaam';
-```
-
-- Djibouti
-
-```typescript
-import Djibouti from 'date-and-time/timezones/Africa/Djibouti';
-```
-
-- Douala
-
-```typescript
-import Douala from 'date-and-time/timezones/Africa/Douala';
-```
-
-- El_Aaiun
-
-```typescript
-import El_Aaiun from 'date-and-time/timezones/Africa/El_Aaiun';
-```
-
-- Freetown
-
-```typescript
-import Freetown from 'date-and-time/timezones/Africa/Freetown';
-```
-
-- Gaborone
-
-```typescript
-import Gaborone from 'date-and-time/timezones/Africa/Gaborone';
-```
-
-- Harare
-
-```typescript
-import Harare from 'date-and-time/timezones/Africa/Harare';
-```
-
-- Johannesburg
-
-```typescript
-import Johannesburg from 'date-and-time/timezones/Africa/Johannesburg';
-```
-
-- Juba
-
-```typescript
-import Juba from 'date-and-time/timezones/Africa/Juba';
-```
-
-- Kampala
-
-```typescript
-import Kampala from 'date-and-time/timezones/Africa/Kampala';
-```
-
-- Khartoum
-
-```typescript
-import Khartoum from 'date-and-time/timezones/Africa/Khartoum';
-```
-
-- Kigali
-
-```typescript
-import Kigali from 'date-and-time/timezones/Africa/Kigali';
-```
-
-- Kinshasa
-
-```typescript
-import Kinshasa from 'date-and-time/timezones/Africa/Kinshasa';
-```
-
-- Lagos
-
-```typescript
-import Lagos from 'date-and-time/timezones/Africa/Lagos';
-```
-
-- Libreville
-
-```typescript
-import Libreville from 'date-and-time/timezones/Africa/Libreville';
-```
-
-- Lome
-
-```typescript
-import Lome from 'date-and-time/timezones/Africa/Lome';
-```
-
-- Luanda
-
-```typescript
-import Luanda from 'date-and-time/timezones/Africa/Luanda';
-```
-
-- Lubumbashi
-
-```typescript
-import Lubumbashi from 'date-and-time/timezones/Africa/Lubumbashi';
-```
-
-- Lusaka
-
-```typescript
-import Lusaka from 'date-and-time/timezones/Africa/Lusaka';
-```
-
-- Malabo
-
-```typescript
-import Malabo from 'date-and-time/timezones/Africa/Malabo';
-```
-
-- Maputo
-
-```typescript
-import Maputo from 'date-and-time/timezones/Africa/Maputo';
-```
-
-- Maseru
-
-```typescript
-import Maseru from 'date-and-time/timezones/Africa/Maseru';
-```
-
-- Mbabane
-
-```typescript
-import Mbabane from 'date-and-time/timezones/Africa/Mbabane';
-```
-
-- Mogadishu
-
-```typescript
-import Mogadishu from 'date-and-time/timezones/Africa/Mogadishu';
-```
-
-- Monrovia
-
-```typescript
-import Monrovia from 'date-and-time/timezones/Africa/Monrovia';
-```
-
-- Nairobi
-
-```typescript
-import Nairobi from 'date-and-time/timezones/Africa/Nairobi';
-```
-
-- Ndjamena
-
-```typescript
-import Ndjamena from 'date-and-time/timezones/Africa/Ndjamena';
-```
-
-- Niamey
-
-```typescript
-import Niamey from 'date-and-time/timezones/Africa/Niamey';
-```
-
-- Nouakchott
-
-```typescript
-import Nouakchott from 'date-and-time/timezones/Africa/Nouakchott';
-```
-
-- Ouagadougou
-
-```typescript
-import Ouagadougou from 'date-and-time/timezones/Africa/Ouagadougou';
-```
-
-- Porto-Novo
-
-```typescript
-import Porto_Novo from 'date-and-time/timezones/Africa/Porto_Novo';
-```
-
-- Sao_Tome
-
-```typescript
-import Sao_Tome from 'date-and-time/timezones/Africa/Sao_Tome';
-```
-
-- Tripoli
-
-```typescript
-import Tripoli from 'date-and-time/timezones/Africa/Tripoli';
-```
-
-- Tunis
-
-```typescript
-import Tunis from 'date-and-time/timezones/Africa/Tunis';
-```
-
-- Windhoek
-
-```typescript
-import Windhoek from 'date-and-time/timezones/Africa/Windhoek';
-```
+- Africa/Abidjan
+- Africa/Accra
+- Africa/Addis_Ababa
+- Africa/Algiers
+- Africa/Asmara
+- Africa/Bamako
+- Africa/Bangui
+- Africa/Banjul
+- Africa/Bissau
+- Africa/Blantyre
+- Africa/Brazzaville
+- Africa/Bujumbura
+- Africa/Cairo
+- Africa/Casablanca
+- Africa/Ceuta
+- Africa/Conakry
+- Africa/Dakar
+- Africa/Dar_es_Salaam
+- Africa/Djibouti
+- Africa/Douala
+- Africa/El_Aaiun
+- Africa/Freetown
+- Africa/Gaborone
+- Africa/Harare
+- Africa/Johannesburg
+- Africa/Juba
+- Africa/Kampala
+- Africa/Khartoum
+- Africa/Kigali
+- Africa/Kinshasa
+- Africa/Lagos
+- Africa/Libreville
+- Africa/Lome
+- Africa/Luanda
+- Africa/Lubumbashi
+- Africa/Lusaka
+- Africa/Malabo
+- Africa/Maputo
+- Africa/Maseru
+- Africa/Mbabane
+- Africa/Mogadishu
+- Africa/Monrovia
+- Africa/Nairobi
+- Africa/Ndjamena
+- Africa/Niamey
+- Africa/Nouakchott
+- Africa/Ouagadougou
+- Africa/Porto-Novo
+- Africa/Sao_Tome
+- Africa/Tripoli
+- Africa/Tunis
+- Africa/Windhoek
## America
-- Adak
-
-```typescript
-import Adak from 'date-and-time/timezones/America/Adak';
-```
-
-- Anchorage
-
-```typescript
-import Anchorage from 'date-and-time/timezones/America/Anchorage';
-```
-
-- Anguilla
-
-```typescript
-import Anguilla from 'date-and-time/timezones/America/Anguilla';
-```
-
-- Antigua
-
-```typescript
-import Antigua from 'date-and-time/timezones/America/Antigua';
-```
-
-- Araguaina
-
-```typescript
-import Araguaina from 'date-and-time/timezones/America/Araguaina';
-```
+- America/Adak
+- America/Anchorage
+- America/Anguilla
+- America/Antigua
+- America/Araguaina
+- America/Argentina/Buenos_Aires
+- America/Argentina/Catamarca
+- America/Argentina/Cordoba
+- America/Argentina/Jujuy
+- America/Argentina/La_Rioja
+- America/Argentina/Mendoza
+- America/Argentina/Rio_Gallegos
+- America/Argentina/Salta
+- America/Argentina/San_Juan
+- America/Argentina/San_Luis
+- America/Argentina/Tucuman
+- America/Argentina/Ushuaia
+- America/Aruba
+- America/Asuncion
+- America/Atikokan
+- America/Bahia_Banderas
+- America/Bahia
+- America/Barbados
+- America/Belem
+- America/Belize
+- America/Blanc-Sablon
+- America/Boa_Vista
+- America/Bogota
+- America/Boise
+- America/Cambridge_Bay
+- America/Campo_Grande
+- America/Cancun
+- America/Caracas
+- America/Cayenne
+- America/Cayman
+- America/Chicago
+- America/Chihuahua
+- America/Ciudad_Juarez
+- America/Costa_Rica
+- America/Coyhaique
+- America/Creston
+- America/Cuiaba
+- America/Curacao
+- America/Danmarkshavn
+- America/Dawson_Creek
+- America/Dawson
+- America/Denver
+- America/Detroit
+- America/Dominica
+- America/Edmonton
+- America/Eirunepe
+- America/El_Salvador
+- America/Fort_Nelson
+- America/Fortaleza
+- America/Glace_Bay
+- America/Goose_Bay
+- America/Grand_Turk
+- America/Grenada
+- America/Guadeloupe
+- America/Guatemala
+- America/Guayaquil
+- America/Guyana
+- America/Halifax
+- America/Havana
+- America/Hermosillo
+- America/Indiana/Indianapolis
+- America/Indiana/Knox
+- America/Indiana/Marengo
+- America/Indiana/Petersburg
+- America/Indiana/Tell_City
+- America/Indiana/Vevay
+- America/Indiana/Vincennes
+- America/Indiana/Winamac
+- America/Inuvik
+- America/Iqaluit
+- America/Jamaica
+- America/Juneau
+- America/Kentucky/Louisville
+- America/Kentucky/Monticello
+- America/Kralendijk
+- America/La_Paz
+- America/Lima
+- America/Los_Angeles
+- America/Lower_Princes
+- America/Maceio
+- America/Managua
+- America/Manaus
+- America/Marigot
+- America/Martinique
+- America/Matamoros
+- America/Mazatlan
+- America/Menominee
+- America/Merida
+- America/Metlakatla
+- America/Mexico_City
+- America/Miquelon
+- America/Moncton
+- America/Monterrey
+- America/Montevideo
+- America/Montserrat
+- America/Nassau
+- America/New_York
+- America/Nome
+- America/Noronha
+- America/North_Dakota/Beulah
+- America/North_Dakota/Center
+- America/North_Dakota/New_Salem
+- America/Nuuk
+- America/Ojinaga
+- America/Panama
+- America/Paramaribo
+- America/Phoenix
+- America/Port_of_Spain
+- America/Port-au-Prince
+- America/Porto_Velho
+- America/Puerto_Rico
+- America/Punta_Arenas
+- America/Rankin_Inlet
+- America/Recife
+- America/Regina
+- America/Resolute
+- America/Rio_Branco
+- America/Santarem
+- America/Santiago
+- America/Santo_Domingo
+- America/Sao_Paulo
+- America/Scoresbysund
+- America/Sitka
+- America/St_Barthelemy
+- America/St_Johns
+- America/St_Kitts
+- America/St_Lucia
+- America/St_Thomas
+- America/St_Vincent
+- America/Swift_Current
+- America/Tegucigalpa
+- America/Thule
+- America/Tijuana
+- America/Toronto
+- America/Tortola
+- America/Vancouver
+- America/Whitehorse
+- America/Winnipeg
+- America/Yakutat
-- Argentina
+## Antarctica
- - Buenos_Aires
+- Antarctica/Casey
+- Antarctica/Davis
+- Antarctica/DumontDUrville
+- Antarctica/Macquarie
+- Antarctica/Mawson
+- Antarctica/McMurdo
+- Antarctica/Palmer
+- Antarctica/Rothera
+- Antarctica/Syowa
+- Antarctica/Troll
+- Antarctica/Vostok
- ```typescript
- import Buenos_Aires from 'date-and-time/timezones/America/Argentina/Buenos_Aires';
- ```
+## Arctic
- - Catamarca
+- Arctic/Longyearbyen
- ```typescript
- import Catamarca from 'date-and-time/timezones/America/Argentina/Catamarca';
- ```
+## Asia
- - Cordoba
+- Asia/Aden
+- Asia/Almaty
+- Asia/Amman
+- Asia/Anadyr
+- Asia/Aqtau
+- Asia/Aqtobe
+- Asia/Ashgabat
+- Asia/Atyrau
+- Asia/Baghdad
+- Asia/Bahrain
+- Asia/Baku
+- Asia/Bangkok
+- Asia/Barnaul
+- Asia/Beirut
+- Asia/Bishkek
+- Asia/Brunei
+- Asia/Chita
+- Asia/Colombo
+- Asia/Damascus
+- Asia/Dhaka
+- Asia/Dili
+- Asia/Dubai
+- Asia/Dushanbe
+- Asia/Famagusta
+- Asia/Gaza
+- Asia/Hebron
+- Asia/Ho_Chi_Minh
+- Asia/Hong_Kong
+- Asia/Hovd
+- Asia/Irkutsk
+- Asia/Jakarta
+- Asia/Jayapura
+- Asia/Jerusalem
+- Asia/Kabul
+- Asia/Kamchatka
+- Asia/Karachi
+- Asia/Kathmandu
+- Asia/Khandyga
+- Asia/Kolkata
+- Asia/Krasnoyarsk
+- Asia/Kuala_Lumpur
+- Asia/Kuching
+- Asia/Kuwait
+- Asia/Macau
+- Asia/Magadan
+- Asia/Makassar
+- Asia/Manila
+- Asia/Muscat
+- Asia/Nicosia
+- Asia/Novokuznetsk
+- Asia/Novosibirsk
+- Asia/Omsk
+- Asia/Oral
+- Asia/Phnom_Penh
+- Asia/Pontianak
+- Asia/Pyongyang
+- Asia/Qatar
+- Asia/Qostanay
+- Asia/Qyzylorda
+- Asia/Riyadh
+- Asia/Sakhalin
+- Asia/Samarkand
+- Asia/Seoul
+- Asia/Shanghai
+- Asia/Singapore
+- Asia/Srednekolymsk
+- Asia/Taipei
+- Asia/Tashkent
+- Asia/Tbilisi
+- Asia/Tehran
+- Asia/Thimphu
+- Asia/Tokyo
+- Asia/Tomsk
+- Asia/Ulaanbaatar
+- Asia/Urumqi
+- Asia/Ust-Nera
+- Asia/Vientiane
+- Asia/Vladivostok
+- Asia/Yakutsk
+- Asia/Yangon
+- Asia/Yekaterinburg
+- Asia/Yerevan
- ```typescript
- import Cordoba from 'date-and-time/timezones/America/Argentina/Cordoba';
- ```
+## Atlantic
- - Jujuy
+- Atlantic/Azores
+- Atlantic/Bermuda
+- Atlantic/Canary
+- Atlantic/Cape_Verde
+- Atlantic/Faroe
+- Atlantic/Madeira
+- Atlantic/Reykjavik
+- Atlantic/South_Georgia
+- Atlantic/St_Helena
+- Atlantic/Stanley
- ```typescript
- import Jujuy from 'date-and-time/timezones/America/Argentina/Jujuy';
- ```
+## Australia
- - La_Rioja
+- Australia/Adelaide
+- Australia/Brisbane
+- Australia/Broken_Hill
+- Australia/Darwin
+- Australia/Eucla
+- Australia/Hobart
+- Australia/Lindeman
+- Australia/Lord_Howe
+- Australia/Melbourne
+- Australia/Perth
+- Australia/Sydney
- ```typescript
- import La_Rioja from 'date-and-time/timezones/America/Argentina/La_Rioja';
- ```
+## Europe
- - Mendoza
+- Europe/Amsterdam
+- Europe/Andorra
+- Europe/Astrakhan
+- Europe/Athens
+- Europe/Belgrade
+- Europe/Berlin
+- Europe/Bratislava
+- Europe/Brussels
+- Europe/Bucharest
+- Europe/Budapest
+- Europe/Busingen
+- Europe/Chisinau
+- Europe/Copenhagen
+- Europe/Dublin
+- Europe/Gibraltar
+- Europe/Guernsey
+- Europe/Helsinki
+- Europe/Isle_of_Man
+- Europe/Istanbul
+- Europe/Jersey
+- Europe/Kaliningrad
+- Europe/Kirov
+- Europe/Kyiv
+- Europe/Lisbon
+- Europe/Ljubljana
+- Europe/London
+- Europe/Luxembourg
+- Europe/Madrid
+- Europe/Malta
+- Europe/Mariehamn
+- Europe/Minsk
+- Europe/Monaco
+- Europe/Moscow
+- Europe/Oslo
+- Europe/Paris
+- Europe/Podgorica
+- Europe/Prague
+- Europe/Riga
+- Europe/Rome
+- Europe/Samara
+- Europe/San_Marino
+- Europe/Sarajevo
+- Europe/Saratov
+- Europe/Simferopol
+- Europe/Skopje
+- Europe/Sofia
+- Europe/Stockholm
+- Europe/Tallinn
+- Europe/Tirane
+- Europe/Ulyanovsk
+- Europe/Vaduz
+- Europe/Vatican
+- Europe/Vienna
+- Europe/Vilnius
+- Europe/Volgograd
+- Europe/Warsaw
+- Europe/Zagreb
+- Europe/Zurich
- ```typescript
- import Mendoza from 'date-and-time/timezones/America/Argentina/Mendoza';
- ```
+## Indian
- - Rio_Gallegos
+- Indian/Antananarivo
+- Indian/Chagos
+- Indian/Christmas
+- Indian/Cocos
+- Indian/Comoro
+- Indian/Kerguelen
+- Indian/Mahe
+- Indian/Maldives
+- Indian/Mauritius
+- Indian/Mayotte
+- Indian/Reunion
- ```typescript
- import Rio_Gallegos from 'date-and-time/timezones/America/Argentina/Rio_Gallegos';
- ```
+## Pacific
- - Salta
-
- ```typescript
- import Salta from 'date-and-time/timezones/America/Argentina/Salta';
- ```
-
- - San_Juan
-
- ```typescript
- import San_Juan from 'date-and-time/timezones/America/Argentina/San_Juan';
- ```
-
- - San_Luis
-
- ```typescript
- import San_Luis from 'date-and-time/timezones/America/Argentina/San_Luis';
- ```
-
- - Tucuman
-
- ```typescript
- import Tucuman from 'date-and-time/timezones/America/Argentina/Tucuman';
- ```
-
- - Ushuaia
-
- ```typescript
- import Ushuaia from 'date-and-time/timezones/America/Argentina/Ushuaia';
- ```
-
-- Aruba
-
-```typescript
-import Aruba from 'date-and-time/timezones/America/Aruba';
-```
-
-- Asuncion
-
-```typescript
-import Asuncion from 'date-and-time/timezones/America/Asuncion';
-```
-
-- Atikokan
-
-```typescript
-import Atikokan from 'date-and-time/timezones/America/Atikokan';
-```
-
-- Bahia_Banderas
-
-```typescript
-import Bahia_Banderas from 'date-and-time/timezones/America/Bahia_Banderas';
-```
-
-- Bahia
-
-```typescript
-import Bahia from 'date-and-time/timezones/America/Bahia';
-```
-
-- Barbados
-
-```typescript
-import Barbados from 'date-and-time/timezones/America/Barbados';
-```
-
-- Belem
-
-```typescript
-import Belem from 'date-and-time/timezones/America/Belem';
-```
-
-- Belize
-
-```typescript
-import Belize from 'date-and-time/timezones/America/Belize';
-```
-
-- Blanc-Sablon
-
-```typescript
-import Blanc_Sablon from 'date-and-time/timezones/America/Blanc_Sablon';
-```
-
-- Boa_Vista
-
-```typescript
-import Boa_Vista from 'date-and-time/timezones/America/Boa_Vista';
-```
-
-- Bogota
-
-```typescript
-import Bogota from 'date-and-time/timezones/America/Bogota';
-```
-
-- Boise
-
-```typescript
-import Boise from 'date-and-time/timezones/America/Boise';
-```
-
-- Cambridge_Bay
-
-```typescript
-import Cambridge_Bay from 'date-and-time/timezones/America/Cambridge_Bay';
-```
-
-- Campo_Grande
-
-```typescript
-import Campo_Grande from 'date-and-time/timezones/America/Campo_Grande';
-```
-
-- Cancun
-
-```typescript
-import Cancun from 'date-and-time/timezones/America/Cancun';
-```
-
-- Caracas
-
-```typescript
-import Caracas from 'date-and-time/timezones/America/Caracas';
-```
-
-- Cayenne
-
-```typescript
-import Cayenne from 'date-and-time/timezones/America/Cayenne';
-```
-
-- Cayman
-
-```typescript
-import Cayman from 'date-and-time/timezones/America/Cayman';
-```
-
-- Chicago
-
-```typescript
-import Chicago from 'date-and-time/timezones/America/Chicago';
-```
-
-- Chihuahua
-
-```typescript
-import Chihuahua from 'date-and-time/timezones/America/Chihuahua';
-```
-
-- Ciudad_Juarez
-
-```typescript
-import Ciudad_Juarez from 'date-and-time/timezones/America/Ciudad_Juarez';
-```
-
-- Costa_Rica
-
-```typescript
-import Costa_Rica from 'date-and-time/timezones/America/Costa_Rica';
-```
-
-- Coyhaique
-
-```typescript
-import Coyhaique from 'date-and-time/timezones/America/Coyhaique';
-```
-
-- Creston
-
-```typescript
-import Creston from 'date-and-time/timezones/America/Creston';
-```
-
-- Cuiaba
-
-```typescript
-import Cuiaba from 'date-and-time/timezones/America/Cuiaba';
-```
-
-- Curacao
-
-```typescript
-import Curacao from 'date-and-time/timezones/America/Curacao';
-```
-
-- Danmarkshavn
-
-```typescript
-import Danmarkshavn from 'date-and-time/timezones/America/Danmarkshavn';
-```
-
-- Dawson_Creek
-
-```typescript
-import Dawson_Creek from 'date-and-time/timezones/America/Dawson_Creek';
-```
-
-- Dawson
-
-```typescript
-import Dawson from 'date-and-time/timezones/America/Dawson';
-```
-
-- Denver
-
-```typescript
-import Denver from 'date-and-time/timezones/America/Denver';
-```
-
-- Detroit
-
-```typescript
-import Detroit from 'date-and-time/timezones/America/Detroit';
-```
-
-- Dominica
-
-```typescript
-import Dominica from 'date-and-time/timezones/America/Dominica';
-```
-
-- Edmonton
-
-```typescript
-import Edmonton from 'date-and-time/timezones/America/Edmonton';
-```
-
-- Eirunepe
-
-```typescript
-import Eirunepe from 'date-and-time/timezones/America/Eirunepe';
-```
-
-- El_Salvador
-
-```typescript
-import El_Salvador from 'date-and-time/timezones/America/El_Salvador';
-```
-
-- Fort_Nelson
-
-```typescript
-import Fort_Nelson from 'date-and-time/timezones/America/Fort_Nelson';
-```
-
-- Fortaleza
-
-```typescript
-import Fortaleza from 'date-and-time/timezones/America/Fortaleza';
-```
-
-- Glace_Bay
-
-```typescript
-import Glace_Bay from 'date-and-time/timezones/America/Glace_Bay';
-```
-
-- Goose_Bay
-
-```typescript
-import Goose_Bay from 'date-and-time/timezones/America/Goose_Bay';
-```
-
-- Grand_Turk
-
-```typescript
-import Grand_Turk from 'date-and-time/timezones/America/Grand_Turk';
-```
-
-- Grenada
-
-```typescript
-import Grenada from 'date-and-time/timezones/America/Grenada';
-```
-
-- Guadeloupe
-
-```typescript
-import Guadeloupe from 'date-and-time/timezones/America/Guadeloupe';
-```
-
-- Guatemala
-
-```typescript
-import Guatemala from 'date-and-time/timezones/America/Guatemala';
-```
-
-- Guayaquil
-
-```typescript
-import Guayaquil from 'date-and-time/timezones/America/Guayaquil';
-```
-
-- Guyana
-
-```typescript
-import Guyana from 'date-and-time/timezones/America/Guyana';
-```
-
-- Halifax
-
-```typescript
-import Halifax from 'date-and-time/timezones/America/Halifax';
-```
-
-- Havana
-
-```typescript
-import Havana from 'date-and-time/timezones/America/Havana';
-```
-
-- Hermosillo
-
-```typescript
-import Hermosillo from 'date-and-time/timezones/America/Hermosillo';
-```
-
-- Indiana
-
- - Indianapolis
-
- ```typescript
- import Indianapolis from 'date-and-time/timezones/America/Indiana/Indianapolis';
- ```
-
- - Knox
-
- ```typescript
- import Knox from 'date-and-time/timezones/America/Indiana/Knox';
- ```
-
- - Marengo
-
- ```typescript
- import Marengo from 'date-and-time/timezones/America/Indiana/Marengo';
- ```
-
- - Petersburg
-
- ```typescript
- import Petersburg from 'date-and-time/timezones/America/Indiana/Petersburg';
- ```
-
- - Tell_City
-
- ```typescript
- import Tell_City from 'date-and-time/timezones/America/Indiana/Tell_City';
- ```
-
- - Vevay
-
- ```typescript
- import Vevay from 'date-and-time/timezones/America/Indiana/Vevay';
- ```
-
- - Vincennes
-
- ```typescript
- import Vincennes from 'date-and-time/timezones/America/Indiana/Vincennes';
- ```
-
- - Winamac
-
- ```typescript
- import Winamac from 'date-and-time/timezones/America/Indiana/Winamac';
- ```
-
-- Inuvik
-
-```typescript
-import Inuvik from 'date-and-time/timezones/America/Inuvik';
-```
-
-- Iqaluit
-
-```typescript
-import Iqaluit from 'date-and-time/timezones/America/Iqaluit';
-```
-
-- Jamaica
-
-```typescript
-import Jamaica from 'date-and-time/timezones/America/Jamaica';
-```
-
-- Juneau
-
-```typescript
-import Juneau from 'date-and-time/timezones/America/Juneau';
-```
-
-- Kentucky
-
- - Louisville
-
- ```typescript
- import Louisville from 'date-and-time/timezones/America/Kentucky/Louisville';
- ```
-
- - Monticello
-
- ```typescript
- import Monticello from 'date-and-time/timezones/America/Kentucky/Monticello';
- ```
-
-- Kralendijk
-
-```typescript
-import Kralendijk from 'date-and-time/timezones/America/Kralendijk';
-```
-
-- La_Paz
-
-```typescript
-import La_Paz from 'date-and-time/timezones/America/La_Paz';
-```
-
-- Lima
-
-```typescript
-import Lima from 'date-and-time/timezones/America/Lima';
-```
-
-- Los_Angeles
-
-```typescript
-import Los_Angeles from 'date-and-time/timezones/America/Los_Angeles';
-```
-
-- Lower_Princes
-
-```typescript
-import Lower_Princes from 'date-and-time/timezones/America/Lower_Princes';
-```
-
-- Maceio
-
-```typescript
-import Maceio from 'date-and-time/timezones/America/Maceio';
-```
-
-- Managua
-
-```typescript
-import Managua from 'date-and-time/timezones/America/Managua';
-```
-
-- Manaus
-
-```typescript
-import Manaus from 'date-and-time/timezones/America/Manaus';
-```
-
-- Marigot
-
-```typescript
-import Marigot from 'date-and-time/timezones/America/Marigot';
-```
-
-- Martinique
-
-```typescript
-import Martinique from 'date-and-time/timezones/America/Martinique';
-```
-
-- Matamoros
-
-```typescript
-import Matamoros from 'date-and-time/timezones/America/Matamoros';
-```
-
-- Mazatlan
-
-```typescript
-import Mazatlan from 'date-and-time/timezones/America/Mazatlan';
-```
-
-- Menominee
-
-```typescript
-import Menominee from 'date-and-time/timezones/America/Menominee';
-```
-
-- Merida
-
-```typescript
-import Merida from 'date-and-time/timezones/America/Merida';
-```
-
-- Metlakatla
-
-```typescript
-import Metlakatla from 'date-and-time/timezones/America/Metlakatla';
-```
-
-- Mexico_City
-
-```typescript
-import Mexico_City from 'date-and-time/timezones/America/Mexico_City';
-```
-
-- Miquelon
-
-```typescript
-import Miquelon from 'date-and-time/timezones/America/Miquelon';
-```
-
-- Moncton
-
-```typescript
-import Moncton from 'date-and-time/timezones/America/Moncton';
-```
-
-- Monterrey
-
-```typescript
-import Monterrey from 'date-and-time/timezones/America/Monterrey';
-```
-
-- Montevideo
-
-```typescript
-import Montevideo from 'date-and-time/timezones/America/Montevideo';
-```
-
-- Montserrat
-
-```typescript
-import Montserrat from 'date-and-time/timezones/America/Montserrat';
-```
-
-- Nassau
-
-```typescript
-import Nassau from 'date-and-time/timezones/America/Nassau';
-```
-
-- New_York
-
-```typescript
-import New_York from 'date-and-time/timezones/America/New_York';
-```
-
-- Nome
-
-```typescript
-import Nome from 'date-and-time/timezones/America/Nome';
-```
-
-- Noronha
-
-```typescript
-import Noronha from 'date-and-time/timezones/America/Noronha';
-```
-
-- North_Dakota
-
- - Beulah
-
- ```typescript
- import Beulah from 'date-and-time/timezones/America/North_Dakota/Beulah';
- ```
-
- - Center
-
- ```typescript
- import Center from 'date-and-time/timezones/America/North_Dakota/Center';
- ```
-
- - New_Salem
-
- ```typescript
- import New_Salem from 'date-and-time/timezones/America/North_Dakota/New_Salem';
- ```
-
-- Nuuk
-
-```typescript
-import Nuuk from 'date-and-time/timezones/America/Nuuk';
-```
-
-- Ojinaga
-
-```typescript
-import Ojinaga from 'date-and-time/timezones/America/Ojinaga';
-```
-
-- Panama
-
-```typescript
-import Panama from 'date-and-time/timezones/America/Panama';
-```
-
-- Paramaribo
-
-```typescript
-import Paramaribo from 'date-and-time/timezones/America/Paramaribo';
-```
-
-- Phoenix
-
-```typescript
-import Phoenix from 'date-and-time/timezones/America/Phoenix';
-```
-
-- Port_of_Spain
-
-```typescript
-import Port_of_Spain from 'date-and-time/timezones/America/Port_of_Spain';
-```
-
-- Port-au-Prince
-
-```typescript
-import Port_au_Prince from 'date-and-time/timezones/America/Port_au_Prince';
-```
-
-- Porto_Velho
-
-```typescript
-import Porto_Velho from 'date-and-time/timezones/America/Porto_Velho';
-```
-
-- Puerto_Rico
-
-```typescript
-import Puerto_Rico from 'date-and-time/timezones/America/Puerto_Rico';
-```
-
-- Punta_Arenas
-
-```typescript
-import Punta_Arenas from 'date-and-time/timezones/America/Punta_Arenas';
-```
-
-- Rankin_Inlet
-
-```typescript
-import Rankin_Inlet from 'date-and-time/timezones/America/Rankin_Inlet';
-```
-
-- Recife
-
-```typescript
-import Recife from 'date-and-time/timezones/America/Recife';
-```
-
-- Regina
-
-```typescript
-import Regina from 'date-and-time/timezones/America/Regina';
-```
-
-- Resolute
-
-```typescript
-import Resolute from 'date-and-time/timezones/America/Resolute';
-```
-
-- Rio_Branco
-
-```typescript
-import Rio_Branco from 'date-and-time/timezones/America/Rio_Branco';
-```
-
-- Santarem
-
-```typescript
-import Santarem from 'date-and-time/timezones/America/Santarem';
-```
-
-- Santiago
-
-```typescript
-import Santiago from 'date-and-time/timezones/America/Santiago';
-```
-
-- Santo_Domingo
-
-```typescript
-import Santo_Domingo from 'date-and-time/timezones/America/Santo_Domingo';
-```
-
-- Sao_Paulo
-
-```typescript
-import Sao_Paulo from 'date-and-time/timezones/America/Sao_Paulo';
-```
-
-- Scoresbysund
-
-```typescript
-import Scoresbysund from 'date-and-time/timezones/America/Scoresbysund';
-```
-
-- Sitka
-
-```typescript
-import Sitka from 'date-and-time/timezones/America/Sitka';
-```
-
-- St_Barthelemy
-
-```typescript
-import St_Barthelemy from 'date-and-time/timezones/America/St_Barthelemy';
-```
-
-- St_Johns
-
-```typescript
-import St_Johns from 'date-and-time/timezones/America/St_Johns';
-```
-
-- St_Kitts
-
-```typescript
-import St_Kitts from 'date-and-time/timezones/America/St_Kitts';
-```
-
-- St_Lucia
-
-```typescript
-import St_Lucia from 'date-and-time/timezones/America/St_Lucia';
-```
-
-- St_Thomas
-
-```typescript
-import St_Thomas from 'date-and-time/timezones/America/St_Thomas';
-```
-
-- St_Vincent
-
-```typescript
-import St_Vincent from 'date-and-time/timezones/America/St_Vincent';
-```
-
-- Swift_Current
-
-```typescript
-import Swift_Current from 'date-and-time/timezones/America/Swift_Current';
-```
-
-- Tegucigalpa
-
-```typescript
-import Tegucigalpa from 'date-and-time/timezones/America/Tegucigalpa';
-```
-
-- Thule
-
-```typescript
-import Thule from 'date-and-time/timezones/America/Thule';
-```
-
-- Tijuana
-
-```typescript
-import Tijuana from 'date-and-time/timezones/America/Tijuana';
-```
-
-- Toronto
-
-```typescript
-import Toronto from 'date-and-time/timezones/America/Toronto';
-```
-
-- Tortola
-
-```typescript
-import Tortola from 'date-and-time/timezones/America/Tortola';
-```
-
-- Vancouver
-
-```typescript
-import Vancouver from 'date-and-time/timezones/America/Vancouver';
-```
-
-- Whitehorse
-
-```typescript
-import Whitehorse from 'date-and-time/timezones/America/Whitehorse';
-```
-
-- Winnipeg
-
-```typescript
-import Winnipeg from 'date-and-time/timezones/America/Winnipeg';
-```
-
-- Yakutat
-
-```typescript
-import Yakutat from 'date-and-time/timezones/America/Yakutat';
-```
-
-## Antarctica
-
-- Casey
-
-```typescript
-import Casey from 'date-and-time/timezones/Antarctica/Casey';
-```
-
-- Davis
-
-```typescript
-import Davis from 'date-and-time/timezones/Antarctica/Davis';
-```
-
-- DumontDUrville
-
-```typescript
-import DumontDUrville from 'date-and-time/timezones/Antarctica/DumontDUrville';
-```
-
-- Macquarie
-
-```typescript
-import Macquarie from 'date-and-time/timezones/Antarctica/Macquarie';
-```
-
-- Mawson
-
-```typescript
-import Mawson from 'date-and-time/timezones/Antarctica/Mawson';
-```
-
-- McMurdo
-
-```typescript
-import McMurdo from 'date-and-time/timezones/Antarctica/McMurdo';
-```
-
-- Palmer
-
-```typescript
-import Palmer from 'date-and-time/timezones/Antarctica/Palmer';
-```
-
-- Rothera
-
-```typescript
-import Rothera from 'date-and-time/timezones/Antarctica/Rothera';
-```
-
-- Syowa
-
-```typescript
-import Syowa from 'date-and-time/timezones/Antarctica/Syowa';
-```
-
-- Troll
-
-```typescript
-import Troll from 'date-and-time/timezones/Antarctica/Troll';
-```
-
-- Vostok
-
-```typescript
-import Vostok from 'date-and-time/timezones/Antarctica/Vostok';
-```
-
-## Arctic
-
-- Longyearbyen
-
-```typescript
-import Longyearbyen from 'date-and-time/timezones/Arctic/Longyearbyen';
-```
-
-## Asia
-
-- Aden
-
-```typescript
-import Aden from 'date-and-time/timezones/Asia/Aden';
-```
-
-- Almaty
-
-```typescript
-import Almaty from 'date-and-time/timezones/Asia/Almaty';
-```
-
-- Amman
-
-```typescript
-import Amman from 'date-and-time/timezones/Asia/Amman';
-```
-
-- Anadyr
-
-```typescript
-import Anadyr from 'date-and-time/timezones/Asia/Anadyr';
-```
-
-- Aqtau
-
-```typescript
-import Aqtau from 'date-and-time/timezones/Asia/Aqtau';
-```
-
-- Aqtobe
-
-```typescript
-import Aqtobe from 'date-and-time/timezones/Asia/Aqtobe';
-```
-
-- Ashgabat
-
-```typescript
-import Ashgabat from 'date-and-time/timezones/Asia/Ashgabat';
-```
-
-- Atyrau
-
-```typescript
-import Atyrau from 'date-and-time/timezones/Asia/Atyrau';
-```
-
-- Baghdad
-
-```typescript
-import Baghdad from 'date-and-time/timezones/Asia/Baghdad';
-```
-
-- Bahrain
-
-```typescript
-import Bahrain from 'date-and-time/timezones/Asia/Bahrain';
-```
-
-- Baku
-
-```typescript
-import Baku from 'date-and-time/timezones/Asia/Baku';
-```
-
-- Bangkok
-
-```typescript
-import Bangkok from 'date-and-time/timezones/Asia/Bangkok';
-```
-
-- Barnaul
-
-```typescript
-import Barnaul from 'date-and-time/timezones/Asia/Barnaul';
-```
-
-- Beirut
-
-```typescript
-import Beirut from 'date-and-time/timezones/Asia/Beirut';
-```
-
-- Bishkek
-
-```typescript
-import Bishkek from 'date-and-time/timezones/Asia/Bishkek';
-```
-
-- Brunei
-
-```typescript
-import Brunei from 'date-and-time/timezones/Asia/Brunei';
-```
-
-- Chita
-
-```typescript
-import Chita from 'date-and-time/timezones/Asia/Chita';
-```
-
-- Colombo
-
-```typescript
-import Colombo from 'date-and-time/timezones/Asia/Colombo';
-```
-
-- Damascus
-
-```typescript
-import Damascus from 'date-and-time/timezones/Asia/Damascus';
-```
-
-- Dhaka
-
-```typescript
-import Dhaka from 'date-and-time/timezones/Asia/Dhaka';
-```
-
-- Dili
-
-```typescript
-import Dili from 'date-and-time/timezones/Asia/Dili';
-```
-
-- Dubai
-
-```typescript
-import Dubai from 'date-and-time/timezones/Asia/Dubai';
-```
-
-- Dushanbe
-
-```typescript
-import Dushanbe from 'date-and-time/timezones/Asia/Dushanbe';
-```
-
-- Famagusta
-
-```typescript
-import Famagusta from 'date-and-time/timezones/Asia/Famagusta';
-```
-
-- Gaza
-
-```typescript
-import Gaza from 'date-and-time/timezones/Asia/Gaza';
-```
-
-- Hebron
-
-```typescript
-import Hebron from 'date-and-time/timezones/Asia/Hebron';
-```
-
-- Ho_Chi_Minh
-
-```typescript
-import Ho_Chi_Minh from 'date-and-time/timezones/Asia/Ho_Chi_Minh';
-```
-
-- Hong_Kong
-
-```typescript
-import Hong_Kong from 'date-and-time/timezones/Asia/Hong_Kong';
-```
-
-- Hovd
-
-```typescript
-import Hovd from 'date-and-time/timezones/Asia/Hovd';
-```
-
-- Irkutsk
-
-```typescript
-import Irkutsk from 'date-and-time/timezones/Asia/Irkutsk';
-```
-
-- Jakarta
-
-```typescript
-import Jakarta from 'date-and-time/timezones/Asia/Jakarta';
-```
-
-- Jayapura
-
-```typescript
-import Jayapura from 'date-and-time/timezones/Asia/Jayapura';
-```
-
-- Jerusalem
-
-```typescript
-import Jerusalem from 'date-and-time/timezones/Asia/Jerusalem';
-```
-
-- Kabul
-
-```typescript
-import Kabul from 'date-and-time/timezones/Asia/Kabul';
-```
-
-- Kamchatka
-
-```typescript
-import Kamchatka from 'date-and-time/timezones/Asia/Kamchatka';
-```
-
-- Karachi
-
-```typescript
-import Karachi from 'date-and-time/timezones/Asia/Karachi';
-```
-
-- Kathmandu
-
-```typescript
-import Kathmandu from 'date-and-time/timezones/Asia/Kathmandu';
-```
-
-- Khandyga
-
-```typescript
-import Khandyga from 'date-and-time/timezones/Asia/Khandyga';
-```
-
-- Kolkata
-
-```typescript
-import Kolkata from 'date-and-time/timezones/Asia/Kolkata';
-```
-
-- Krasnoyarsk
-
-```typescript
-import Krasnoyarsk from 'date-and-time/timezones/Asia/Krasnoyarsk';
-```
-
-- Kuala_Lumpur
-
-```typescript
-import Kuala_Lumpur from 'date-and-time/timezones/Asia/Kuala_Lumpur';
-```
-
-- Kuching
-
-```typescript
-import Kuching from 'date-and-time/timezones/Asia/Kuching';
-```
-
-- Kuwait
-
-```typescript
-import Kuwait from 'date-and-time/timezones/Asia/Kuwait';
-```
-
-- Macau
-
-```typescript
-import Macau from 'date-and-time/timezones/Asia/Macau';
-```
-
-- Magadan
-
-```typescript
-import Magadan from 'date-and-time/timezones/Asia/Magadan';
-```
-
-- Makassar
-
-```typescript
-import Makassar from 'date-and-time/timezones/Asia/Makassar';
-```
-
-- Manila
-
-```typescript
-import Manila from 'date-and-time/timezones/Asia/Manila';
-```
-
-- Muscat
-
-```typescript
-import Muscat from 'date-and-time/timezones/Asia/Muscat';
-```
-
-- Nicosia
-
-```typescript
-import Nicosia from 'date-and-time/timezones/Asia/Nicosia';
-```
-
-- Novokuznetsk
-
-```typescript
-import Novokuznetsk from 'date-and-time/timezones/Asia/Novokuznetsk';
-```
-
-- Novosibirsk
-
-```typescript
-import Novosibirsk from 'date-and-time/timezones/Asia/Novosibirsk';
-```
-
-- Omsk
-
-```typescript
-import Omsk from 'date-and-time/timezones/Asia/Omsk';
-```
-
-- Oral
-
-```typescript
-import Oral from 'date-and-time/timezones/Asia/Oral';
-```
-
-- Phnom_Penh
-
-```typescript
-import Phnom_Penh from 'date-and-time/timezones/Asia/Phnom_Penh';
-```
-
-- Pontianak
-
-```typescript
-import Pontianak from 'date-and-time/timezones/Asia/Pontianak';
-```
-
-- Pyongyang
-
-```typescript
-import Pyongyang from 'date-and-time/timezones/Asia/Pyongyang';
-```
-
-- Qatar
-
-```typescript
-import Qatar from 'date-and-time/timezones/Asia/Qatar';
-```
-
-- Qostanay
-
-```typescript
-import Qostanay from 'date-and-time/timezones/Asia/Qostanay';
-```
-
-- Qyzylorda
-
-```typescript
-import Qyzylorda from 'date-and-time/timezones/Asia/Qyzylorda';
-```
-
-- Riyadh
-
-```typescript
-import Riyadh from 'date-and-time/timezones/Asia/Riyadh';
-```
-
-- Sakhalin
-
-```typescript
-import Sakhalin from 'date-and-time/timezones/Asia/Sakhalin';
-```
-
-- Samarkand
-
-```typescript
-import Samarkand from 'date-and-time/timezones/Asia/Samarkand';
-```
-
-- Seoul
-
-```typescript
-import Seoul from 'date-and-time/timezones/Asia/Seoul';
-```
-
-- Shanghai
-
-```typescript
-import Shanghai from 'date-and-time/timezones/Asia/Shanghai';
-```
-
-- Singapore
-
-```typescript
-import Singapore from 'date-and-time/timezones/Asia/Singapore';
-```
-
-- Srednekolymsk
-
-```typescript
-import Srednekolymsk from 'date-and-time/timezones/Asia/Srednekolymsk';
-```
-
-- Taipei
-
-```typescript
-import Taipei from 'date-and-time/timezones/Asia/Taipei';
-```
-
-- Tashkent
-
-```typescript
-import Tashkent from 'date-and-time/timezones/Asia/Tashkent';
-```
-
-- Tbilisi
-
-```typescript
-import Tbilisi from 'date-and-time/timezones/Asia/Tbilisi';
-```
-
-- Tehran
-
-```typescript
-import Tehran from 'date-and-time/timezones/Asia/Tehran';
-```
-
-- Thimphu
-
-```typescript
-import Thimphu from 'date-and-time/timezones/Asia/Thimphu';
-```
-
-- Tokyo
-
-```typescript
-import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
-```
-
-- Tomsk
-
-```typescript
-import Tomsk from 'date-and-time/timezones/Asia/Tomsk';
-```
-
-- Ulaanbaatar
-
-```typescript
-import Ulaanbaatar from 'date-and-time/timezones/Asia/Ulaanbaatar';
-```
-
-- Urumqi
-
-```typescript
-import Urumqi from 'date-and-time/timezones/Asia/Urumqi';
-```
-
-- Ust-Nera
-
-```typescript
-import Ust_Nera from 'date-and-time/timezones/Asia/Ust_Nera';
-```
-
-- Vientiane
-
-```typescript
-import Vientiane from 'date-and-time/timezones/Asia/Vientiane';
-```
-
-- Vladivostok
-
-```typescript
-import Vladivostok from 'date-and-time/timezones/Asia/Vladivostok';
-```
-
-- Yakutsk
-
-```typescript
-import Yakutsk from 'date-and-time/timezones/Asia/Yakutsk';
-```
-
-- Yangon
-
-```typescript
-import Yangon from 'date-and-time/timezones/Asia/Yangon';
-```
-
-- Yekaterinburg
-
-```typescript
-import Yekaterinburg from 'date-and-time/timezones/Asia/Yekaterinburg';
-```
-
-- Yerevan
-
-```typescript
-import Yerevan from 'date-and-time/timezones/Asia/Yerevan';
-```
-
-## Atlantic
-
-- Azores
-
-```typescript
-import Azores from 'date-and-time/timezones/Atlantic/Azores';
-```
-
-- Bermuda
-
-```typescript
-import Bermuda from 'date-and-time/timezones/Atlantic/Bermuda';
-```
-
-- Canary
-
-```typescript
-import Canary from 'date-and-time/timezones/Atlantic/Canary';
-```
-
-- Cape_Verde
-
-```typescript
-import Cape_Verde from 'date-and-time/timezones/Atlantic/Cape_Verde';
-```
-
-- Faroe
-
-```typescript
-import Faroe from 'date-and-time/timezones/Atlantic/Faroe';
-```
-
-- Madeira
-
-```typescript
-import Madeira from 'date-and-time/timezones/Atlantic/Madeira';
-```
-
-- Reykjavik
-
-```typescript
-import Reykjavik from 'date-and-time/timezones/Atlantic/Reykjavik';
-```
-
-- South_Georgia
-
-```typescript
-import South_Georgia from 'date-and-time/timezones/Atlantic/South_Georgia';
-```
-
-- St_Helena
-
-```typescript
-import St_Helena from 'date-and-time/timezones/Atlantic/St_Helena';
-```
-
-- Stanley
-
-```typescript
-import Stanley from 'date-and-time/timezones/Atlantic/Stanley';
-```
-
-## Australia
-
-- Adelaide
-
-```typescript
-import Adelaide from 'date-and-time/timezones/Australia/Adelaide';
-```
-
-- Brisbane
-
-```typescript
-import Brisbane from 'date-and-time/timezones/Australia/Brisbane';
-```
-
-- Broken_Hill
-
-```typescript
-import Broken_Hill from 'date-and-time/timezones/Australia/Broken_Hill';
-```
-
-- Darwin
-
-```typescript
-import Darwin from 'date-and-time/timezones/Australia/Darwin';
-```
-
-- Eucla
-
-```typescript
-import Eucla from 'date-and-time/timezones/Australia/Eucla';
-```
-
-- Hobart
-
-```typescript
-import Hobart from 'date-and-time/timezones/Australia/Hobart';
-```
-
-- Lindeman
-
-```typescript
-import Lindeman from 'date-and-time/timezones/Australia/Lindeman';
-```
-
-- Lord_Howe
-
-```typescript
-import Lord_Howe from 'date-and-time/timezones/Australia/Lord_Howe';
-```
-
-- Melbourne
-
-```typescript
-import Melbourne from 'date-and-time/timezones/Australia/Melbourne';
-```
-
-- Perth
-
-```typescript
-import Perth from 'date-and-time/timezones/Australia/Perth';
-```
-
-- Sydney
-
-```typescript
-import Sydney from 'date-and-time/timezones/Australia/Sydney';
-```
-
-## Europe
-
-- Amsterdam
-
-```typescript
-import Amsterdam from 'date-and-time/timezones/Europe/Amsterdam';
-```
-
-- Andorra
-
-```typescript
-import Andorra from 'date-and-time/timezones/Europe/Andorra';
-```
-
-- Astrakhan
-
-```typescript
-import Astrakhan from 'date-and-time/timezones/Europe/Astrakhan';
-```
-
-- Athens
-
-```typescript
-import Athens from 'date-and-time/timezones/Europe/Athens';
-```
-
-- Belgrade
-
-```typescript
-import Belgrade from 'date-and-time/timezones/Europe/Belgrade';
-```
-
-- Berlin
-
-```typescript
-import Berlin from 'date-and-time/timezones/Europe/Berlin';
-```
-
-- Bratislava
-
-```typescript
-import Bratislava from 'date-and-time/timezones/Europe/Bratislava';
-```
-
-- Brussels
-
-```typescript
-import Brussels from 'date-and-time/timezones/Europe/Brussels';
-```
-
-- Bucharest
-
-```typescript
-import Bucharest from 'date-and-time/timezones/Europe/Bucharest';
-```
-
-- Budapest
-
-```typescript
-import Budapest from 'date-and-time/timezones/Europe/Budapest';
-```
-
-- Busingen
-
-```typescript
-import Busingen from 'date-and-time/timezones/Europe/Busingen';
-```
-
-- Chisinau
-
-```typescript
-import Chisinau from 'date-and-time/timezones/Europe/Chisinau';
-```
-
-- Copenhagen
-
-```typescript
-import Copenhagen from 'date-and-time/timezones/Europe/Copenhagen';
-```
-
-- Dublin
-
-```typescript
-import Dublin from 'date-and-time/timezones/Europe/Dublin';
-```
-
-- Gibraltar
-
-```typescript
-import Gibraltar from 'date-and-time/timezones/Europe/Gibraltar';
-```
-
-- Guernsey
-
-```typescript
-import Guernsey from 'date-and-time/timezones/Europe/Guernsey';
-```
-
-- Helsinki
-
-```typescript
-import Helsinki from 'date-and-time/timezones/Europe/Helsinki';
-```
-
-- Isle_of_Man
-
-```typescript
-import Isle_of_Man from 'date-and-time/timezones/Europe/Isle_of_Man';
-```
-
-- Istanbul
-
-```typescript
-import Istanbul from 'date-and-time/timezones/Europe/Istanbul';
-```
-
-- Jersey
-
-```typescript
-import Jersey from 'date-and-time/timezones/Europe/Jersey';
-```
-
-- Kaliningrad
-
-```typescript
-import Kaliningrad from 'date-and-time/timezones/Europe/Kaliningrad';
-```
-
-- Kirov
-
-```typescript
-import Kirov from 'date-and-time/timezones/Europe/Kirov';
-```
-
-- Kyiv
-
-```typescript
-import Kyiv from 'date-and-time/timezones/Europe/Kyiv';
-```
-
-- Lisbon
-
-```typescript
-import Lisbon from 'date-and-time/timezones/Europe/Lisbon';
-```
-
-- Ljubljana
-
-```typescript
-import Ljubljana from 'date-and-time/timezones/Europe/Ljubljana';
-```
-
-- London
-
-```typescript
-import London from 'date-and-time/timezones/Europe/London';
-```
-
-- Luxembourg
-
-```typescript
-import Luxembourg from 'date-and-time/timezones/Europe/Luxembourg';
-```
-
-- Madrid
-
-```typescript
-import Madrid from 'date-and-time/timezones/Europe/Madrid';
-```
-
-- Malta
-
-```typescript
-import Malta from 'date-and-time/timezones/Europe/Malta';
-```
-
-- Mariehamn
-
-```typescript
-import Mariehamn from 'date-and-time/timezones/Europe/Mariehamn';
-```
-
-- Minsk
-
-```typescript
-import Minsk from 'date-and-time/timezones/Europe/Minsk';
-```
-
-- Monaco
-
-```typescript
-import Monaco from 'date-and-time/timezones/Europe/Monaco';
-```
-
-- Moscow
-
-```typescript
-import Moscow from 'date-and-time/timezones/Europe/Moscow';
-```
-
-- Oslo
-
-```typescript
-import Oslo from 'date-and-time/timezones/Europe/Oslo';
-```
-
-- Paris
-
-```typescript
-import Paris from 'date-and-time/timezones/Europe/Paris';
-```
-
-- Podgorica
-
-```typescript
-import Podgorica from 'date-and-time/timezones/Europe/Podgorica';
-```
-
-- Prague
-
-```typescript
-import Prague from 'date-and-time/timezones/Europe/Prague';
-```
-
-- Riga
-
-```typescript
-import Riga from 'date-and-time/timezones/Europe/Riga';
-```
-
-- Rome
-
-```typescript
-import Rome from 'date-and-time/timezones/Europe/Rome';
-```
-
-- Samara
-
-```typescript
-import Samara from 'date-and-time/timezones/Europe/Samara';
-```
-
-- San_Marino
-
-```typescript
-import San_Marino from 'date-and-time/timezones/Europe/San_Marino';
-```
-
-- Sarajevo
-
-```typescript
-import Sarajevo from 'date-and-time/timezones/Europe/Sarajevo';
-```
-
-- Saratov
-
-```typescript
-import Saratov from 'date-and-time/timezones/Europe/Saratov';
-```
-
-- Simferopol
-
-```typescript
-import Simferopol from 'date-and-time/timezones/Europe/Simferopol';
-```
-
-- Skopje
-
-```typescript
-import Skopje from 'date-and-time/timezones/Europe/Skopje';
-```
-
-- Sofia
-
-```typescript
-import Sofia from 'date-and-time/timezones/Europe/Sofia';
-```
-
-- Stockholm
-
-```typescript
-import Stockholm from 'date-and-time/timezones/Europe/Stockholm';
-```
-
-- Tallinn
-
-```typescript
-import Tallinn from 'date-and-time/timezones/Europe/Tallinn';
-```
-
-- Tirane
-
-```typescript
-import Tirane from 'date-and-time/timezones/Europe/Tirane';
-```
-
-- Ulyanovsk
-
-```typescript
-import Ulyanovsk from 'date-and-time/timezones/Europe/Ulyanovsk';
-```
-
-- Vaduz
-
-```typescript
-import Vaduz from 'date-and-time/timezones/Europe/Vaduz';
-```
-
-- Vatican
-
-```typescript
-import Vatican from 'date-and-time/timezones/Europe/Vatican';
-```
-
-- Vienna
-
-```typescript
-import Vienna from 'date-and-time/timezones/Europe/Vienna';
-```
-
-- Vilnius
-
-```typescript
-import Vilnius from 'date-and-time/timezones/Europe/Vilnius';
-```
-
-- Volgograd
-
-```typescript
-import Volgograd from 'date-and-time/timezones/Europe/Volgograd';
-```
-
-- Warsaw
-
-```typescript
-import Warsaw from 'date-and-time/timezones/Europe/Warsaw';
-```
-
-- Zagreb
-
-```typescript
-import Zagreb from 'date-and-time/timezones/Europe/Zagreb';
-```
-
-- Zurich
-
-```typescript
-import Zurich from 'date-and-time/timezones/Europe/Zurich';
-```
-
-## Indian
-
-- Antananarivo
-
-```typescript
-import Antananarivo from 'date-and-time/timezones/Indian/Antananarivo';
-```
-
-- Chagos
-
-```typescript
-import Chagos from 'date-and-time/timezones/Indian/Chagos';
-```
-
-- Christmas
-
-```typescript
-import Christmas from 'date-and-time/timezones/Indian/Christmas';
-```
-
-- Cocos
-
-```typescript
-import Cocos from 'date-and-time/timezones/Indian/Cocos';
-```
-
-- Comoro
-
-```typescript
-import Comoro from 'date-and-time/timezones/Indian/Comoro';
-```
-
-- Kerguelen
-
-```typescript
-import Kerguelen from 'date-and-time/timezones/Indian/Kerguelen';
-```
-
-- Mahe
-
-```typescript
-import Mahe from 'date-and-time/timezones/Indian/Mahe';
-```
-
-- Maldives
-
-```typescript
-import Maldives from 'date-and-time/timezones/Indian/Maldives';
-```
-
-- Mauritius
-
-```typescript
-import Mauritius from 'date-and-time/timezones/Indian/Mauritius';
-```
-
-- Mayotte
-
-```typescript
-import Mayotte from 'date-and-time/timezones/Indian/Mayotte';
-```
-
-- Reunion
-
-```typescript
-import Reunion from 'date-and-time/timezones/Indian/Reunion';
-```
-
-## Pacific
-
-- Apia
-
-```typescript
-import Apia from 'date-and-time/timezones/Pacific/Apia';
-```
-
-- Auckland
-
-```typescript
-import Auckland from 'date-and-time/timezones/Pacific/Auckland';
-```
-
-- Bougainville
-
-```typescript
-import Bougainville from 'date-and-time/timezones/Pacific/Bougainville';
-```
-
-- Chatham
-
-```typescript
-import Chatham from 'date-and-time/timezones/Pacific/Chatham';
-```
-
-- Chuuk
-
-```typescript
-import Chuuk from 'date-and-time/timezones/Pacific/Chuuk';
-```
-
-- Easter
-
-```typescript
-import Easter from 'date-and-time/timezones/Pacific/Easter';
-```
-
-- Efate
-
-```typescript
-import Efate from 'date-and-time/timezones/Pacific/Efate';
-```
-
-- Fakaofo
-
-```typescript
-import Fakaofo from 'date-and-time/timezones/Pacific/Fakaofo';
-```
-
-- Fiji
-
-```typescript
-import Fiji from 'date-and-time/timezones/Pacific/Fiji';
-```
-
-- Funafuti
-
-```typescript
-import Funafuti from 'date-and-time/timezones/Pacific/Funafuti';
-```
-
-- Galapagos
-
-```typescript
-import Galapagos from 'date-and-time/timezones/Pacific/Galapagos';
-```
-
-- Gambier
-
-```typescript
-import Gambier from 'date-and-time/timezones/Pacific/Gambier';
-```
-
-- Guadalcanal
-
-```typescript
-import Guadalcanal from 'date-and-time/timezones/Pacific/Guadalcanal';
-```
-
-- Guam
-
-```typescript
-import Guam from 'date-and-time/timezones/Pacific/Guam';
-```
-
-- Honolulu
-
-```typescript
-import Honolulu from 'date-and-time/timezones/Pacific/Honolulu';
-```
-
-- Kanton
-
-```typescript
-import Kanton from 'date-and-time/timezones/Pacific/Kanton';
-```
-
-- Kiritimati
-
-```typescript
-import Kiritimati from 'date-and-time/timezones/Pacific/Kiritimati';
-```
-
-- Kosrae
-
-```typescript
-import Kosrae from 'date-and-time/timezones/Pacific/Kosrae';
-```
-
-- Kwajalein
-
-```typescript
-import Kwajalein from 'date-and-time/timezones/Pacific/Kwajalein';
-```
-
-- Majuro
-
-```typescript
-import Majuro from 'date-and-time/timezones/Pacific/Majuro';
-```
-
-- Marquesas
-
-```typescript
-import Marquesas from 'date-and-time/timezones/Pacific/Marquesas';
-```
-
-- Midway
-
-```typescript
-import Midway from 'date-and-time/timezones/Pacific/Midway';
-```
-
-- Nauru
-
-```typescript
-import Nauru from 'date-and-time/timezones/Pacific/Nauru';
-```
-
-- Niue
-
-```typescript
-import Niue from 'date-and-time/timezones/Pacific/Niue';
-```
-
-- Norfolk
-
-```typescript
-import Norfolk from 'date-and-time/timezones/Pacific/Norfolk';
-```
-
-- Noumea
-
-```typescript
-import Noumea from 'date-and-time/timezones/Pacific/Noumea';
-```
-
-- Pago_Pago
-
-```typescript
-import Pago_Pago from 'date-and-time/timezones/Pacific/Pago_Pago';
-```
-
-- Palau
-
-```typescript
-import Palau from 'date-and-time/timezones/Pacific/Palau';
-```
-
-- Pitcairn
-
-```typescript
-import Pitcairn from 'date-and-time/timezones/Pacific/Pitcairn';
-```
-
-- Pohnpei
-
-```typescript
-import Pohnpei from 'date-and-time/timezones/Pacific/Pohnpei';
-```
-
-- Port_Moresby
-
-```typescript
-import Port_Moresby from 'date-and-time/timezones/Pacific/Port_Moresby';
-```
-
-- Rarotonga
-
-```typescript
-import Rarotonga from 'date-and-time/timezones/Pacific/Rarotonga';
-```
-
-- Saipan
-
-```typescript
-import Saipan from 'date-and-time/timezones/Pacific/Saipan';
-```
-
-- Tahiti
-
-```typescript
-import Tahiti from 'date-and-time/timezones/Pacific/Tahiti';
-```
-
-- Tarawa
-
-```typescript
-import Tarawa from 'date-and-time/timezones/Pacific/Tarawa';
-```
-
-- Tongatapu
-
-```typescript
-import Tongatapu from 'date-and-time/timezones/Pacific/Tongatapu';
-```
-
-- Wake
-
-```typescript
-import Wake from 'date-and-time/timezones/Pacific/Wake';
-```
-
-- Wallis
-
-```typescript
-import Wallis from 'date-and-time/timezones/Pacific/Wallis';
-```
+- Pacific/Apia
+- Pacific/Auckland
+- Pacific/Bougainville
+- Pacific/Chatham
+- Pacific/Chuuk
+- Pacific/Easter
+- Pacific/Efate
+- Pacific/Fakaofo
+- Pacific/Fiji
+- Pacific/Funafuti
+- Pacific/Galapagos
+- Pacific/Gambier
+- Pacific/Guadalcanal
+- Pacific/Guam
+- Pacific/Honolulu
+- Pacific/Kanton
+- Pacific/Kiritimati
+- Pacific/Kosrae
+- Pacific/Kwajalein
+- Pacific/Majuro
+- Pacific/Marquesas
+- Pacific/Midway
+- Pacific/Nauru
+- Pacific/Niue
+- Pacific/Norfolk
+- Pacific/Noumea
+- Pacific/Pago_Pago
+- Pacific/Palau
+- Pacific/Pitcairn
+- Pacific/Pohnpei
+- Pacific/Port_Moresby
+- Pacific/Rarotonga
+- Pacific/Saipan
+- Pacific/Tahiti
+- Pacific/Tarawa
+- Pacific/Tongatapu
+- Pacific/Wake
+- Pacific/Wallis
diff --git a/package-lock.json b/package-lock.json
index 72e7bda..396ed5b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,30 +1,30 @@
{
"name": "date-and-time",
- "version": "4.3.1",
+ "version": "4.4.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "date-and-time",
- "version": "4.3.1",
+ "version": "4.4.0",
"license": "MIT",
"devDependencies": {
"@eslint/js": "^10.0.1",
"@rollup/plugin-alias": "^6.0.0",
"@rollup/plugin-terser": "^1.0.0",
"@stylistic/eslint-plugin": "^5.10.0",
- "@types/node": "^25.3.5",
- "@vitest/coverage-v8": "^4.0.18",
- "eslint": "^10.0.3",
+ "@types/node": "^25.5.0",
+ "@vitest/coverage-v8": "^4.1.2",
+ "eslint": "^10.1.0",
"glob": "^13.0.6",
"prettier": "^3.8.1",
- "rollup": "^4.59.0",
- "rollup-plugin-dts": "^6.3.0",
+ "rollup": "^4.60.0",
+ "rollup-plugin-dts": "^6.4.1",
"rollup-plugin-esbuild": "^6.2.1",
"tsx": "^4.21.0",
- "typescript-eslint": "^8.56.1",
+ "typescript-eslint": "^8.57.2",
"vitepress": "^1.6.4",
- "vitest": "^4.0.18"
+ "vitest": "^4.1.2"
},
"engines": {
"node": ">=18"
@@ -423,6 +423,43 @@
}
}
},
+ "node_modules/@emnapi/core": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.1.tgz",
+ "integrity": "sha512-mukuNALVsoix/w1BJwFzwXBN/dHeejQtuVzcDsfOEsdpCumXb/E9j8w11h5S54tT1xhifGfbbSm/ICrObRb3KA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "@emnapi/wasi-threads": "1.2.0",
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/runtime": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.1.tgz",
+ "integrity": "sha512-VYi5+ZVLhpgK4hQ0TAjiQiZ6ol0oe4mBx7mVv7IflsiEp0OWoVsp/+f9Vc1hOhE0TtkORVrI1GvzyreqpgWtkA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/wasi-threads": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.0.tgz",
+ "integrity": "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
"node_modules/@esbuild/aix-ppc64": {
"version": "0.25.12",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz",
@@ -1073,6 +1110,17 @@
"@jridgewell/trace-mapping": "^0.3.24"
}
},
+ "node_modules/@jridgewell/remapping": {
+ "version": "2.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
@@ -1112,6 +1160,315 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@napi-rs/wasm-runtime": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.2.tgz",
+ "integrity": "sha512-sNXv5oLJ7ob93xkZ1XnxisYhGYXfaG9f65/ZgYuAu3qt7b3NadcOEhLvx28hv31PgX8SZJRYrAIPQilQmFpLVw==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@tybys/wasm-util": "^0.10.1"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Brooooooklyn"
+ },
+ "peerDependencies": {
+ "@emnapi/core": "^1.7.1",
+ "@emnapi/runtime": "^1.7.1"
+ }
+ },
+ "node_modules/@oxc-project/types": {
+ "version": "0.122.0",
+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.122.0.tgz",
+ "integrity": "sha512-oLAl5kBpV4w69UtFZ9xqcmTi+GENWOcPF7FCrczTiBbmC0ibXxCwyvZGbO39rCVEuLGAZM84DH0pUIyyv/YJzA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/Boshen"
+ }
+ },
+ "node_modules/@rolldown/binding-android-arm64": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.12.tgz",
+ "integrity": "sha512-pv1y2Fv0JybcykuiiD3qBOBdz6RteYojRFY1d+b95WVuzx211CRh+ytI/+9iVyWQ6koTh5dawe4S/yRfOFjgaA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-darwin-arm64": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.12.tgz",
+ "integrity": "sha512-cFYr6zTG/3PXXF3pUO+umXxt1wkRK/0AYT8lDwuqvRC+LuKYWSAQAQZjCWDQpAH172ZV6ieYrNnFzVVcnSflAg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-darwin-x64": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.12.tgz",
+ "integrity": "sha512-ZCsYknnHzeXYps0lGBz8JrF37GpE9bFVefrlmDrAQhOEi4IOIlcoU1+FwHEtyXGx2VkYAvhu7dyBf75EJQffBw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-freebsd-x64": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.12.tgz",
+ "integrity": "sha512-dMLeprcVsyJsKolRXyoTH3NL6qtsT0Y2xeuEA8WQJquWFXkEC4bcu1rLZZSnZRMtAqwtrF/Ib9Ddtpa/Gkge9Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm-gnueabihf": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.12.tgz",
+ "integrity": "sha512-YqWjAgGC/9M1lz3GR1r1rP79nMgo3mQiiA+Hfo+pvKFK1fAJ1bCi0ZQVh8noOqNacuY1qIcfyVfP6HoyBRZ85Q==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm64-gnu": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.12.tgz",
+ "integrity": "sha512-/I5AS4cIroLpslsmzXfwbe5OmWvSsrFuEw3mwvbQ1kDxJ822hFHIx+vsN/TAzNVyepI/j/GSzrtCIwQPeKCLIg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm64-musl": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.12.tgz",
+ "integrity": "sha512-V6/wZztnBqlx5hJQqNWwFdxIKN0m38p8Jas+VoSfgH54HSj9tKTt1dZvG6JRHcjh6D7TvrJPWFGaY9UBVOaWPw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-ppc64-gnu": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.12.tgz",
+ "integrity": "sha512-AP3E9BpcUYliZCxa3w5Kwj9OtEVDYK6sVoUzy4vTOJsjPOgdaJZKFmN4oOlX0Wp0RPV2ETfmIra9x1xuayFB7g==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-s390x-gnu": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.12.tgz",
+ "integrity": "sha512-nWwpvUSPkoFmZo0kQazZYOrT7J5DGOJ/+QHHzjvNlooDZED8oH82Yg67HvehPPLAg5fUff7TfWFHQS8IV1n3og==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-x64-gnu": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.12.tgz",
+ "integrity": "sha512-RNrafz5bcwRy+O9e6P8Z/OCAJW/A+qtBczIqVYwTs14pf4iV1/+eKEjdOUta93q2TsT/FI0XYDP3TCky38LMAg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-x64-musl": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.12.tgz",
+ "integrity": "sha512-Jpw/0iwoKWx3LJ2rc1yjFrj+T7iHZn2JDg1Yny1ma0luviFS4mhAIcd1LFNxK3EYu3DHWCps0ydXQ5i/rrJ2ig==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-openharmony-arm64": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.12.tgz",
+ "integrity": "sha512-vRugONE4yMfVn0+7lUKdKvN4D5YusEiPilaoO2sgUWpCvrncvWgPMzK00ZFFJuiPgLwgFNP5eSiUlv2tfc+lpA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-wasm32-wasi": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.12.tgz",
+ "integrity": "sha512-ykGiLr/6kkiHc0XnBfmFJuCjr5ZYKKofkx+chJWDjitX+KsJuAmrzWhwyOMSHzPhzOHOy7u9HlFoa5MoAOJ/Zg==",
+ "cpu": [
+ "wasm32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@napi-rs/wasm-runtime": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@rolldown/binding-win32-arm64-msvc": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.12.tgz",
+ "integrity": "sha512-5eOND4duWkwx1AzCxadcOrNeighiLwMInEADT0YM7xeEOOFcovWZCq8dadXgcRHSf3Ulh1kFo/qvzoFiCLOL1Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-win32-x64-msvc": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.12.tgz",
+ "integrity": "sha512-PyqoipaswDLAZtot351MLhrlrh6lcZPo2LSYE+VDxbVk24LVKAGOuE4hb8xZQmrPAuEtTZW8E6D2zc5EUZX4Lw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.12.tgz",
+ "integrity": "sha512-HHMwmarRKvoFsJorqYlFeFRzXZqCt2ETQlEDOb9aqssrnVBB1/+xgTGtuTrIk5vzLNX1MjMtTf7W9z3tsSbrxw==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/@rollup/plugin-alias": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-6.0.0.tgz",
@@ -1154,9 +1511,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz",
- "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.0.tgz",
+ "integrity": "sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A==",
"cpu": [
"arm"
],
@@ -1168,9 +1525,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz",
- "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.0.tgz",
+ "integrity": "sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw==",
"cpu": [
"arm64"
],
@@ -1182,9 +1539,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz",
- "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.0.tgz",
+ "integrity": "sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA==",
"cpu": [
"arm64"
],
@@ -1196,9 +1553,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz",
- "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.0.tgz",
+ "integrity": "sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw==",
"cpu": [
"x64"
],
@@ -1210,9 +1567,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz",
- "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.0.tgz",
+ "integrity": "sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw==",
"cpu": [
"arm64"
],
@@ -1224,9 +1581,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz",
- "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.0.tgz",
+ "integrity": "sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA==",
"cpu": [
"x64"
],
@@ -1238,13 +1595,16 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz",
- "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.0.tgz",
+ "integrity": "sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==",
"cpu": [
"arm"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1252,13 +1612,16 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz",
- "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.0.tgz",
+ "integrity": "sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==",
"cpu": [
"arm"
],
"dev": true,
+ "libc": [
+ "musl"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1266,13 +1629,16 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz",
- "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.0.tgz",
+ "integrity": "sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==",
"cpu": [
"arm64"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1280,13 +1646,16 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz",
- "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.0.tgz",
+ "integrity": "sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==",
"cpu": [
"arm64"
],
"dev": true,
+ "libc": [
+ "musl"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1294,13 +1663,16 @@
]
},
"node_modules/@rollup/rollup-linux-loong64-gnu": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz",
- "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.0.tgz",
+ "integrity": "sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==",
"cpu": [
"loong64"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1308,13 +1680,16 @@
]
},
"node_modules/@rollup/rollup-linux-loong64-musl": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz",
- "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.0.tgz",
+ "integrity": "sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==",
"cpu": [
"loong64"
],
"dev": true,
+ "libc": [
+ "musl"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1322,13 +1697,16 @@
]
},
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz",
- "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.0.tgz",
+ "integrity": "sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==",
"cpu": [
"ppc64"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1336,13 +1714,16 @@
]
},
"node_modules/@rollup/rollup-linux-ppc64-musl": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz",
- "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.0.tgz",
+ "integrity": "sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==",
"cpu": [
"ppc64"
],
"dev": true,
+ "libc": [
+ "musl"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1350,13 +1731,16 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz",
- "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.0.tgz",
+ "integrity": "sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==",
"cpu": [
"riscv64"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1364,13 +1748,16 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz",
- "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.0.tgz",
+ "integrity": "sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==",
"cpu": [
"riscv64"
],
"dev": true,
+ "libc": [
+ "musl"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1378,13 +1765,16 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz",
- "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.0.tgz",
+ "integrity": "sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==",
"cpu": [
"s390x"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1392,13 +1782,16 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz",
- "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.0.tgz",
+ "integrity": "sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==",
"cpu": [
"x64"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1406,13 +1799,16 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz",
- "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.0.tgz",
+ "integrity": "sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==",
"cpu": [
"x64"
],
"dev": true,
+ "libc": [
+ "musl"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -1420,9 +1816,9 @@
]
},
"node_modules/@rollup/rollup-openbsd-x64": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz",
- "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.0.tgz",
+ "integrity": "sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==",
"cpu": [
"x64"
],
@@ -1434,9 +1830,9 @@
]
},
"node_modules/@rollup/rollup-openharmony-arm64": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz",
- "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.0.tgz",
+ "integrity": "sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA==",
"cpu": [
"arm64"
],
@@ -1448,9 +1844,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz",
- "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.0.tgz",
+ "integrity": "sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ==",
"cpu": [
"arm64"
],
@@ -1462,9 +1858,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz",
- "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.0.tgz",
+ "integrity": "sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w==",
"cpu": [
"ia32"
],
@@ -1476,9 +1872,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-gnu": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz",
- "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.0.tgz",
+ "integrity": "sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA==",
"cpu": [
"x64"
],
@@ -1490,9 +1886,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz",
- "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.0.tgz",
+ "integrity": "sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w==",
"cpu": [
"x64"
],
@@ -1618,6 +2014,17 @@
"eslint": "^9.0.0 || ^10.0.0"
}
},
+ "node_modules/@tybys/wasm-util": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz",
+ "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
"node_modules/@types/chai": {
"version": "5.2.3",
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
@@ -1703,9 +2110,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
- "version": "25.3.5",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.5.tgz",
- "integrity": "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA==",
+ "version": "25.5.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
+ "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1727,17 +2134,17 @@
"license": "MIT"
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz",
- "integrity": "sha512-Jz9ZztpB37dNC+HU2HI28Bs9QXpzCz+y/twHOwhyrIRdbuVDxSytJNDl6z/aAKlaRIwC7y8wJdkBv7FxYGgi0A==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.57.2.tgz",
+ "integrity": "sha512-NZZgp0Fm2IkD+La5PR81sd+g+8oS6JwJje+aRWsDocxHkjyRw0J5L5ZTlN3LI1LlOcGL7ph3eaIUmTXMIjLk0w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.12.2",
- "@typescript-eslint/scope-manager": "8.56.1",
- "@typescript-eslint/type-utils": "8.56.1",
- "@typescript-eslint/utils": "8.56.1",
- "@typescript-eslint/visitor-keys": "8.56.1",
+ "@typescript-eslint/scope-manager": "8.57.2",
+ "@typescript-eslint/type-utils": "8.57.2",
+ "@typescript-eslint/utils": "8.57.2",
+ "@typescript-eslint/visitor-keys": "8.57.2",
"ignore": "^7.0.5",
"natural-compare": "^1.4.0",
"ts-api-utils": "^2.4.0"
@@ -1750,7 +2157,7 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "@typescript-eslint/parser": "^8.56.1",
+ "@typescript-eslint/parser": "^8.57.2",
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.0.0"
}
@@ -1766,16 +2173,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.56.1.tgz",
- "integrity": "sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.57.2.tgz",
+ "integrity": "sha512-30ScMRHIAD33JJQkgfGW1t8CURZtjc2JpTrq5n2HFhOefbAhb7ucc7xJwdWcrEtqUIYJ73Nybpsggii6GtAHjA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/scope-manager": "8.56.1",
- "@typescript-eslint/types": "8.56.1",
- "@typescript-eslint/typescript-estree": "8.56.1",
- "@typescript-eslint/visitor-keys": "8.56.1",
+ "@typescript-eslint/scope-manager": "8.57.2",
+ "@typescript-eslint/types": "8.57.2",
+ "@typescript-eslint/typescript-estree": "8.57.2",
+ "@typescript-eslint/visitor-keys": "8.57.2",
"debug": "^4.4.3"
},
"engines": {
@@ -1791,14 +2198,14 @@
}
},
"node_modules/@typescript-eslint/project-service": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.56.1.tgz",
- "integrity": "sha512-TAdqQTzHNNvlVFfR+hu2PDJrURiwKsUvxFn1M0h95BB8ah5jejas08jUWG4dBA68jDMI988IvtfdAI53JzEHOQ==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.57.2.tgz",
+ "integrity": "sha512-FuH0wipFywXRTHf+bTTjNyuNQQsQC3qh/dYzaM4I4W0jrCqjCVuUh99+xd9KamUfmCGPvbO8NDngo/vsnNVqgw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/tsconfig-utils": "^8.56.1",
- "@typescript-eslint/types": "^8.56.1",
+ "@typescript-eslint/tsconfig-utils": "^8.57.2",
+ "@typescript-eslint/types": "^8.57.2",
"debug": "^4.4.3"
},
"engines": {
@@ -1813,14 +2220,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.56.1.tgz",
- "integrity": "sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.57.2.tgz",
+ "integrity": "sha512-snZKH+W4WbWkrBqj4gUNRIGb/jipDW3qMqVJ4C9rzdFc+wLwruxk+2a5D+uoFcKPAqyqEnSb4l2ULuZf95eSkw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.56.1",
- "@typescript-eslint/visitor-keys": "8.56.1"
+ "@typescript-eslint/types": "8.57.2",
+ "@typescript-eslint/visitor-keys": "8.57.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1831,9 +2238,9 @@
}
},
"node_modules/@typescript-eslint/tsconfig-utils": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.56.1.tgz",
- "integrity": "sha512-qOtCYzKEeyr3aR9f28mPJqBty7+DBqsdd63eO0yyDwc6vgThj2UjWfJIcsFeSucYydqcuudMOprZ+x1SpF3ZuQ==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.57.2.tgz",
+ "integrity": "sha512-3Lm5DSM+DCowsUOJC+YqHHnKEfFh5CoGkj5Z31NQSNF4l5wdOwqGn99wmwN/LImhfY3KJnmordBq/4+VDe2eKw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1848,15 +2255,15 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.56.1.tgz",
- "integrity": "sha512-yB/7dxi7MgTtGhZdaHCemf7PuwrHMenHjmzgUW1aJpO+bBU43OycnM3Wn+DdvDO/8zzA9HlhaJ0AUGuvri4oGg==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.57.2.tgz",
+ "integrity": "sha512-Co6ZCShm6kIbAM/s+oYVpKFfW7LBc6FXoPXjTRQ449PPNBY8U0KZXuevz5IFuuUj2H9ss40atTaf9dlGLzbWZg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.56.1",
- "@typescript-eslint/typescript-estree": "8.56.1",
- "@typescript-eslint/utils": "8.56.1",
+ "@typescript-eslint/types": "8.57.2",
+ "@typescript-eslint/typescript-estree": "8.57.2",
+ "@typescript-eslint/utils": "8.57.2",
"debug": "^4.4.3",
"ts-api-utils": "^2.4.0"
},
@@ -1873,9 +2280,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz",
- "integrity": "sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.57.2.tgz",
+ "integrity": "sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1887,16 +2294,16 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.1.tgz",
- "integrity": "sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.57.2.tgz",
+ "integrity": "sha512-2MKM+I6g8tJxfSmFKOnHv2t8Sk3T6rF20A1Puk0svLK+uVapDZB/4pfAeB7nE83uAZrU6OxW+HmOd5wHVdXwXA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/project-service": "8.56.1",
- "@typescript-eslint/tsconfig-utils": "8.56.1",
- "@typescript-eslint/types": "8.56.1",
- "@typescript-eslint/visitor-keys": "8.56.1",
+ "@typescript-eslint/project-service": "8.57.2",
+ "@typescript-eslint/tsconfig-utils": "8.57.2",
+ "@typescript-eslint/types": "8.57.2",
+ "@typescript-eslint/visitor-keys": "8.57.2",
"debug": "^4.4.3",
"minimatch": "^10.2.2",
"semver": "^7.7.3",
@@ -1915,16 +2322,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.56.1.tgz",
- "integrity": "sha512-HPAVNIME3tABJ61siYlHzSWCGtOoeP2RTIaHXFMPqjrQKCGB9OgUVdiNgH7TJS2JNIQ5qQ4RsAUDuGaGme/KOA==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.57.2.tgz",
+ "integrity": "sha512-krRIbvPK1ju1WBKIefiX+bngPs+odIQUtR7kymzPfo1POVw3jlF+nLkmexdSSd4UCbDcQn+wMBATOOmpBbqgKg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.9.1",
- "@typescript-eslint/scope-manager": "8.56.1",
- "@typescript-eslint/types": "8.56.1",
- "@typescript-eslint/typescript-estree": "8.56.1"
+ "@typescript-eslint/scope-manager": "8.57.2",
+ "@typescript-eslint/types": "8.57.2",
+ "@typescript-eslint/typescript-estree": "8.57.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1939,13 +2346,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.1.tgz",
- "integrity": "sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.57.2.tgz",
+ "integrity": "sha512-zhahknjobV2FiD6Ee9iLbS7OV9zi10rG26odsQdfBO/hjSzUQbkIYgda+iNKK1zNiW2ey+Lf8MU5btN17V3dUw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.56.1",
+ "@typescript-eslint/types": "8.57.2",
"eslint-visitor-keys": "^5.0.0"
},
"engines": {
@@ -1991,29 +2398,29 @@
}
},
"node_modules/@vitest/coverage-v8": {
- "version": "4.0.18",
- "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.0.18.tgz",
- "integrity": "sha512-7i+N2i0+ME+2JFZhfuz7Tg/FqKtilHjGyGvoHYQ6iLV0zahbsJ9sljC9OcFcPDbhYKCet+sG8SsVqlyGvPflZg==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.2.tgz",
+ "integrity": "sha512-sPK//PHO+kAkScb8XITeB1bf7fsk85Km7+rt4eeuRR3VS1/crD47cmV5wicisJmjNdfeokTZwjMk4Mj2d58Mgg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@bcoe/v8-coverage": "^1.0.2",
- "@vitest/utils": "4.0.18",
- "ast-v8-to-istanbul": "^0.3.10",
+ "@vitest/utils": "4.1.2",
+ "ast-v8-to-istanbul": "^1.0.0",
"istanbul-lib-coverage": "^3.2.2",
"istanbul-lib-report": "^3.0.1",
"istanbul-reports": "^3.2.0",
- "magicast": "^0.5.1",
+ "magicast": "^0.5.2",
"obug": "^2.1.1",
- "std-env": "^3.10.0",
- "tinyrainbow": "^3.0.3"
+ "std-env": "^4.0.0-rc.1",
+ "tinyrainbow": "^3.1.0"
},
"funding": {
"url": "https://opencollective.com/vitest"
},
"peerDependencies": {
- "@vitest/browser": "4.0.18",
- "vitest": "4.0.18"
+ "@vitest/browser": "4.1.2",
+ "vitest": "4.1.2"
},
"peerDependenciesMeta": {
"@vitest/browser": {
@@ -2022,44 +2429,44 @@
}
},
"node_modules/@vitest/expect": {
- "version": "4.0.18",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.18.tgz",
- "integrity": "sha512-8sCWUyckXXYvx4opfzVY03EOiYVxyNrHS5QxX3DAIi5dpJAAkyJezHCP77VMX4HKA2LDT/Jpfo8i2r5BE3GnQQ==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.2.tgz",
+ "integrity": "sha512-gbu+7B0YgUJ2nkdsRJrFFW6X7NTP44WlhiclHniUhxADQJH5Szt9mZ9hWnJPJ8YwOK5zUOSSlSvyzRf0u1DSBQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@standard-schema/spec": "^1.0.0",
+ "@standard-schema/spec": "^1.1.0",
"@types/chai": "^5.2.2",
- "@vitest/spy": "4.0.18",
- "@vitest/utils": "4.0.18",
- "chai": "^6.2.1",
- "tinyrainbow": "^3.0.3"
+ "@vitest/spy": "4.1.2",
+ "@vitest/utils": "4.1.2",
+ "chai": "^6.2.2",
+ "tinyrainbow": "^3.1.0"
},
"funding": {
"url": "https://opencollective.com/vitest"
}
},
"node_modules/@vitest/pretty-format": {
- "version": "4.0.18",
- "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.18.tgz",
- "integrity": "sha512-P24GK3GulZWC5tz87ux0m8OADrQIUVDPIjjj65vBXYG17ZeU3qD7r+MNZ1RNv4l8CGU2vtTRqixrOi9fYk/yKw==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.2.tgz",
+ "integrity": "sha512-dwQga8aejqeuB+TvXCMzSQemvV9hNEtDDpgUKDzOmNQayl2OG241PSWeJwKRH3CiC+sESrmoFd49rfnq7T4RnA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "tinyrainbow": "^3.0.3"
+ "tinyrainbow": "^3.1.0"
},
"funding": {
"url": "https://opencollective.com/vitest"
}
},
"node_modules/@vitest/runner": {
- "version": "4.0.18",
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.18.tgz",
- "integrity": "sha512-rpk9y12PGa22Jg6g5M3UVVnTS7+zycIGk9ZNGN+m6tZHKQb7jrP7/77WfZy13Y/EUDd52NDsLRQhYKtv7XfPQw==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.2.tgz",
+ "integrity": "sha512-Gr+FQan34CdiYAwpGJmQG8PgkyFVmARK8/xSijia3eTFgVfpcpztWLuP6FttGNfPLJhaZVP/euvujeNYar36OQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/utils": "4.0.18",
+ "@vitest/utils": "4.1.2",
"pathe": "^2.0.3"
},
"funding": {
@@ -2067,13 +2474,14 @@
}
},
"node_modules/@vitest/snapshot": {
- "version": "4.0.18",
- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.18.tgz",
- "integrity": "sha512-PCiV0rcl7jKQjbgYqjtakly6T1uwv/5BQ9SwBLekVg/EaYeQFPiXcgrC2Y7vDMA8dM1SUEAEV82kgSQIlXNMvA==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.2.tgz",
+ "integrity": "sha512-g7yfUmxYS4mNxk31qbOYsSt2F4m1E02LFqO53Xpzg3zKMhLAPZAjjfyl9e6z7HrW6LvUdTwAQR3HHfLjpko16A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "4.0.18",
+ "@vitest/pretty-format": "4.1.2",
+ "@vitest/utils": "4.1.2",
"magic-string": "^0.30.21",
"pathe": "^2.0.3"
},
@@ -2082,9 +2490,9 @@
}
},
"node_modules/@vitest/spy": {
- "version": "4.0.18",
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.18.tgz",
- "integrity": "sha512-cbQt3PTSD7P2OARdVW3qWER5EGq7PHlvE+QfzSC0lbwO+xnt7+XH06ZzFjFRgzUX//JmpxrCu92VdwvEPlWSNw==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.2.tgz",
+ "integrity": "sha512-DU4fBnbVCJGNBwVA6xSToNXrkZNSiw59H8tcuUspVMsBDBST4nfvsPsEHDHGtWRRnqBERBQu7TrTKskmjqTXKA==",
"dev": true,
"license": "MIT",
"funding": {
@@ -2092,14 +2500,15 @@
}
},
"node_modules/@vitest/utils": {
- "version": "4.0.18",
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.18.tgz",
- "integrity": "sha512-msMRKLMVLWygpK3u2Hybgi4MNjcYJvwTb0Ru09+fOyCXIgT5raYP041DRRdiJiI3k/2U6SEbAETB3YtBrUkCFA==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.2.tgz",
+ "integrity": "sha512-xw2/TiX82lQHA06cgbqRKFb5lCAy3axQ4H4SoUFhUsg+wztiet+co86IAMDtF6Vm1hc7J6j09oh/rgDn+JdKIQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "4.0.18",
- "tinyrainbow": "^3.0.3"
+ "@vitest/pretty-format": "4.1.2",
+ "convert-source-map": "^2.0.0",
+ "tinyrainbow": "^3.1.0"
},
"funding": {
"url": "https://opencollective.com/vitest"
@@ -2447,9 +2856,9 @@
}
},
"node_modules/ast-v8-to-istanbul": {
- "version": "0.3.12",
- "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-0.3.12.tgz",
- "integrity": "sha512-BRRC8VRZY2R4Z4lFIL35MwNXmwVqBityvOIwETtsCSwvjl0IdgFsy9NhdaA6j74nUdtJJlIypeRhpDam19Wq3g==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.0.tgz",
+ "integrity": "sha512-1fSfIwuDICFA4LKkCzRPO7F0hzFf0B7+Xqrl27ynQaa+Rh0e1Es0v6kWHPott3lU10AyAr7oKHa65OppjLn3Rg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2479,9 +2888,9 @@
}
},
"node_modules/brace-expansion": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",
- "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz",
+ "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2559,6 +2968,13 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/copy-anything": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-4.0.5.tgz",
@@ -2632,6 +3048,16 @@
"node": ">=6"
}
},
+ "node_modules/detect-libc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/devlop": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz",
@@ -2729,16 +3155,16 @@
}
},
"node_modules/eslint": {
- "version": "10.0.3",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.0.3.tgz",
- "integrity": "sha512-COV33RzXZkqhG9P2rZCFl9ZmJ7WL+gQSCRzE7RhkbclbQPtLAWReL7ysA0Sh4c8Im2U9ynybdR56PV0XcKvqaQ==",
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.1.0.tgz",
+ "integrity": "sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.2",
"@eslint/config-array": "^0.23.3",
- "@eslint/config-helpers": "^0.5.2",
+ "@eslint/config-helpers": "^0.5.3",
"@eslint/core": "^1.1.1",
"@eslint/plugin-kit": "^0.6.1",
"@humanfs/node": "^0.16.6",
@@ -2751,7 +3177,7 @@
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^9.1.2",
"eslint-visitor-keys": "^5.0.1",
- "espree": "^11.1.1",
+ "espree": "^11.2.0",
"esquery": "^1.7.0",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
@@ -3317,6 +3743,279 @@
"node": ">= 0.8.0"
}
},
+ "node_modules/lightningcss": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
+ "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",
+ "dev": true,
+ "license": "MPL-2.0",
+ "dependencies": {
+ "detect-libc": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "lightningcss-android-arm64": "1.32.0",
+ "lightningcss-darwin-arm64": "1.32.0",
+ "lightningcss-darwin-x64": "1.32.0",
+ "lightningcss-freebsd-x64": "1.32.0",
+ "lightningcss-linux-arm-gnueabihf": "1.32.0",
+ "lightningcss-linux-arm64-gnu": "1.32.0",
+ "lightningcss-linux-arm64-musl": "1.32.0",
+ "lightningcss-linux-x64-gnu": "1.32.0",
+ "lightningcss-linux-x64-musl": "1.32.0",
+ "lightningcss-win32-arm64-msvc": "1.32.0",
+ "lightningcss-win32-x64-msvc": "1.32.0"
+ }
+ },
+ "node_modules/lightningcss-android-arm64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz",
+ "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-darwin-arm64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz",
+ "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-darwin-x64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz",
+ "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-freebsd-x64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz",
+ "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm-gnueabihf": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz",
+ "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-gnu": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz",
+ "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-musl": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz",
+ "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-gnu": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz",
+ "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-musl": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz",
+ "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-arm64-msvc": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz",
+ "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-x64-msvc": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz",
+ "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
"node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
@@ -3852,10 +4551,44 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/rolldown": {
+ "version": "1.0.0-rc.12",
+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.12.tgz",
+ "integrity": "sha512-yP4USLIMYrwpPHEFB5JGH1uxhcslv6/hL0OyvTuY+3qlOSJvZ7ntYnoWpehBxufkgN0cvXxppuTu5hHa/zPh+A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@oxc-project/types": "=0.122.0",
+ "@rolldown/pluginutils": "1.0.0-rc.12"
+ },
+ "bin": {
+ "rolldown": "bin/cli.mjs"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "optionalDependencies": {
+ "@rolldown/binding-android-arm64": "1.0.0-rc.12",
+ "@rolldown/binding-darwin-arm64": "1.0.0-rc.12",
+ "@rolldown/binding-darwin-x64": "1.0.0-rc.12",
+ "@rolldown/binding-freebsd-x64": "1.0.0-rc.12",
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.12",
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.12",
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.12",
+ "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.12",
+ "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.12",
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.12",
+ "@rolldown/binding-linux-x64-musl": "1.0.0-rc.12",
+ "@rolldown/binding-openharmony-arm64": "1.0.0-rc.12",
+ "@rolldown/binding-wasm32-wasi": "1.0.0-rc.12",
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.12",
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.12"
+ }
+ },
"node_modules/rollup": {
- "version": "4.59.0",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz",
- "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==",
+ "version": "4.60.0",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.0.tgz",
+ "integrity": "sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3869,55 +4602,58 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.59.0",
- "@rollup/rollup-android-arm64": "4.59.0",
- "@rollup/rollup-darwin-arm64": "4.59.0",
- "@rollup/rollup-darwin-x64": "4.59.0",
- "@rollup/rollup-freebsd-arm64": "4.59.0",
- "@rollup/rollup-freebsd-x64": "4.59.0",
- "@rollup/rollup-linux-arm-gnueabihf": "4.59.0",
- "@rollup/rollup-linux-arm-musleabihf": "4.59.0",
- "@rollup/rollup-linux-arm64-gnu": "4.59.0",
- "@rollup/rollup-linux-arm64-musl": "4.59.0",
- "@rollup/rollup-linux-loong64-gnu": "4.59.0",
- "@rollup/rollup-linux-loong64-musl": "4.59.0",
- "@rollup/rollup-linux-ppc64-gnu": "4.59.0",
- "@rollup/rollup-linux-ppc64-musl": "4.59.0",
- "@rollup/rollup-linux-riscv64-gnu": "4.59.0",
- "@rollup/rollup-linux-riscv64-musl": "4.59.0",
- "@rollup/rollup-linux-s390x-gnu": "4.59.0",
- "@rollup/rollup-linux-x64-gnu": "4.59.0",
- "@rollup/rollup-linux-x64-musl": "4.59.0",
- "@rollup/rollup-openbsd-x64": "4.59.0",
- "@rollup/rollup-openharmony-arm64": "4.59.0",
- "@rollup/rollup-win32-arm64-msvc": "4.59.0",
- "@rollup/rollup-win32-ia32-msvc": "4.59.0",
- "@rollup/rollup-win32-x64-gnu": "4.59.0",
- "@rollup/rollup-win32-x64-msvc": "4.59.0",
+ "@rollup/rollup-android-arm-eabi": "4.60.0",
+ "@rollup/rollup-android-arm64": "4.60.0",
+ "@rollup/rollup-darwin-arm64": "4.60.0",
+ "@rollup/rollup-darwin-x64": "4.60.0",
+ "@rollup/rollup-freebsd-arm64": "4.60.0",
+ "@rollup/rollup-freebsd-x64": "4.60.0",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.60.0",
+ "@rollup/rollup-linux-arm-musleabihf": "4.60.0",
+ "@rollup/rollup-linux-arm64-gnu": "4.60.0",
+ "@rollup/rollup-linux-arm64-musl": "4.60.0",
+ "@rollup/rollup-linux-loong64-gnu": "4.60.0",
+ "@rollup/rollup-linux-loong64-musl": "4.60.0",
+ "@rollup/rollup-linux-ppc64-gnu": "4.60.0",
+ "@rollup/rollup-linux-ppc64-musl": "4.60.0",
+ "@rollup/rollup-linux-riscv64-gnu": "4.60.0",
+ "@rollup/rollup-linux-riscv64-musl": "4.60.0",
+ "@rollup/rollup-linux-s390x-gnu": "4.60.0",
+ "@rollup/rollup-linux-x64-gnu": "4.60.0",
+ "@rollup/rollup-linux-x64-musl": "4.60.0",
+ "@rollup/rollup-openbsd-x64": "4.60.0",
+ "@rollup/rollup-openharmony-arm64": "4.60.0",
+ "@rollup/rollup-win32-arm64-msvc": "4.60.0",
+ "@rollup/rollup-win32-ia32-msvc": "4.60.0",
+ "@rollup/rollup-win32-x64-gnu": "4.60.0",
+ "@rollup/rollup-win32-x64-msvc": "4.60.0",
"fsevents": "~2.3.2"
}
},
"node_modules/rollup-plugin-dts": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.3.0.tgz",
- "integrity": "sha512-d0UrqxYd8KyZ6i3M2Nx7WOMy708qsV/7fTHMHxCMCBOAe3V/U7OMPu5GkX8hC+cmkHhzGnfeYongl1IgiooddA==",
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.4.1.tgz",
+ "integrity": "sha512-l//F3Zf7ID5GoOfLfD8kroBjQKEKpy1qfhtAdnpibFZMffPaylrg1CoDC2vGkPeTeyxUe4bVFCln2EFuL7IGGg==",
"dev": true,
"license": "LGPL-3.0-only",
"dependencies": {
+ "@jridgewell/remapping": "^2.3.5",
+ "@jridgewell/sourcemap-codec": "^1.5.5",
+ "convert-source-map": "^2.0.0",
"magic-string": "^0.30.21"
},
"engines": {
- "node": ">=16"
+ "node": ">=20"
},
"funding": {
"url": "https://github.com/sponsors/Swatinem"
},
"optionalDependencies": {
- "@babel/code-frame": "^7.27.1"
+ "@babel/code-frame": "^7.29.0"
},
"peerDependencies": {
"rollup": "^3.29.4 || ^4",
- "typescript": "^4.5 || ^5.0"
+ "typescript": "^4.5 || ^5.0 || ^6.0"
}
},
"node_modules/rollup-plugin-esbuild": {
@@ -3962,9 +4698,9 @@
}
},
"node_modules/serialize-javascript": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.4.tgz",
- "integrity": "sha512-DuGdB+Po43Q5Jxwpzt1lhyFSYKryqoNjQSA9M92tyw0lyHIOur+XCalOUe0KTJpyqzT8+fQ5A0Jf7vCx/NKmIg==",
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.5.tgz",
+ "integrity": "sha512-F4LcB0UqUl1zErq+1nYEEzSHJnIwb3AF2XWB94b+afhrekOUijwooAYqFyRbjYkm2PAKBabx6oYv/xDxNi8IBw==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
@@ -4088,9 +4824,9 @@
"license": "MIT"
},
"node_modules/std-env": {
- "version": "3.10.0",
- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz",
- "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.0.0.tgz",
+ "integrity": "sha512-zUMPtQ/HBY3/50VbpkupYHbRroTRZJPRLvreamgErJVys0ceuzMkD44J/QjqhHjOzK42GQ3QZIeFG1OYfOtKqQ==",
"dev": true,
"license": "MIT"
},
@@ -4169,9 +4905,9 @@
"license": "MIT"
},
"node_modules/tinyexec": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz",
- "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.4.tgz",
+ "integrity": "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4196,9 +4932,9 @@
}
},
"node_modules/tinyrainbow": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.0.3.tgz",
- "integrity": "sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz",
+ "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4217,9 +4953,9 @@
}
},
"node_modules/ts-api-utils": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz",
- "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==",
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",
+ "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4229,6 +4965,14 @@
"typescript": ">=4.8.4"
}
},
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "dev": true,
+ "license": "0BSD",
+ "optional": true
+ },
"node_modules/tsx": {
"version": "4.21.0",
"resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz",
@@ -4278,16 +5022,16 @@
}
},
"node_modules/typescript-eslint": {
- "version": "8.56.1",
- "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.56.1.tgz",
- "integrity": "sha512-U4lM6pjmBX7J5wk4szltF7I1cGBHXZopnAXCMXb3+fZ3B/0Z3hq3wS/CCUB2NZBNAExK92mCU2tEohWuwVMsDQ==",
+ "version": "8.57.2",
+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.57.2.tgz",
+ "integrity": "sha512-VEPQ0iPgWO/sBaZOU1xo4nuNdODVOajPnTIbog2GKYr31nIlZ0fWPoCQgGfF3ETyBl1vn63F/p50Um9Z4J8O8A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/eslint-plugin": "8.56.1",
- "@typescript-eslint/parser": "8.56.1",
- "@typescript-eslint/typescript-estree": "8.56.1",
- "@typescript-eslint/utils": "8.56.1"
+ "@typescript-eslint/eslint-plugin": "8.57.2",
+ "@typescript-eslint/parser": "8.57.2",
+ "@typescript-eslint/typescript-estree": "8.57.2",
+ "@typescript-eslint/utils": "8.57.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -4541,31 +5285,31 @@
}
},
"node_modules/vitest": {
- "version": "4.0.18",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.18.tgz",
- "integrity": "sha512-hOQuK7h0FGKgBAas7v0mSAsnvrIgAvWmRFjmzpJ7SwFHH3g1k2u37JtYwOwmEKhK6ZO3v9ggDBBm0La1LCK4uQ==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.2.tgz",
+ "integrity": "sha512-xjR1dMTVHlFLh98JE3i/f/WePqJsah4A0FK9cc8Ehp9Udk0AZk6ccpIZhh1qJ/yxVWRZ+Q54ocnD8TXmkhspGg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/expect": "4.0.18",
- "@vitest/mocker": "4.0.18",
- "@vitest/pretty-format": "4.0.18",
- "@vitest/runner": "4.0.18",
- "@vitest/snapshot": "4.0.18",
- "@vitest/spy": "4.0.18",
- "@vitest/utils": "4.0.18",
- "es-module-lexer": "^1.7.0",
- "expect-type": "^1.2.2",
+ "@vitest/expect": "4.1.2",
+ "@vitest/mocker": "4.1.2",
+ "@vitest/pretty-format": "4.1.2",
+ "@vitest/runner": "4.1.2",
+ "@vitest/snapshot": "4.1.2",
+ "@vitest/spy": "4.1.2",
+ "@vitest/utils": "4.1.2",
+ "es-module-lexer": "^2.0.0",
+ "expect-type": "^1.3.0",
"magic-string": "^0.30.21",
"obug": "^2.1.1",
"pathe": "^2.0.3",
"picomatch": "^4.0.3",
- "std-env": "^3.10.0",
+ "std-env": "^4.0.0-rc.1",
"tinybench": "^2.9.0",
"tinyexec": "^1.0.2",
"tinyglobby": "^0.2.15",
- "tinyrainbow": "^3.0.3",
- "vite": "^6.0.0 || ^7.0.0",
+ "tinyrainbow": "^3.1.0",
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
"why-is-node-running": "^2.3.0"
},
"bin": {
@@ -4581,12 +5325,13 @@
"@edge-runtime/vm": "*",
"@opentelemetry/api": "^1.9.0",
"@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
- "@vitest/browser-playwright": "4.0.18",
- "@vitest/browser-preview": "4.0.18",
- "@vitest/browser-webdriverio": "4.0.18",
- "@vitest/ui": "4.0.18",
+ "@vitest/browser-playwright": "4.1.2",
+ "@vitest/browser-preview": "4.1.2",
+ "@vitest/browser-webdriverio": "4.1.2",
+ "@vitest/ui": "4.1.2",
"happy-dom": "*",
- "jsdom": "*"
+ "jsdom": "*",
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
},
"peerDependenciesMeta": {
"@edge-runtime/vm": {
@@ -4615,17 +5360,20 @@
},
"jsdom": {
"optional": true
+ },
+ "vite": {
+ "optional": false
}
}
},
"node_modules/vitest/node_modules/@vitest/mocker": {
- "version": "4.0.18",
- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.18.tgz",
- "integrity": "sha512-HhVd0MDnzzsgevnOWCBj5Otnzobjy5wLBe4EdeeFGv8luMsGcYqDuFRMcttKWZA5vVO8RFjexVovXvAM4JoJDQ==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.2.tgz",
+ "integrity": "sha512-Ize4iQtEALHDttPRCmN+FKqOl2vxTiNUhzobQFFt/BM1lRUTG7zRCLOykG/6Vo4E4hnUdfVLo5/eqKPukcWW7Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/spy": "4.0.18",
+ "@vitest/spy": "4.1.2",
"estree-walker": "^3.0.3",
"magic-string": "^0.30.21"
},
@@ -4634,7 +5382,7 @@
},
"peerDependencies": {
"msw": "^2.4.9",
- "vite": "^6.0.0 || ^7.0.0-0"
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
},
"peerDependenciesMeta": {
"msw": {
@@ -4645,18 +5393,24 @@
}
}
},
+ "node_modules/vitest/node_modules/es-module-lexer": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz",
+ "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/vitest/node_modules/vite": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz",
- "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==",
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.3.tgz",
+ "integrity": "sha512-B9ifbFudT1TFhfltfaIPgjo9Z3mDynBTJSUYxTjOQruf/zHH+ezCQKcoqO+h7a9Pw9Nm/OtlXAiGT1axBgwqrQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "esbuild": "^0.27.0",
- "fdir": "^6.5.0",
- "picomatch": "^4.0.3",
- "postcss": "^8.5.6",
- "rollup": "^4.43.0",
+ "lightningcss": "^1.32.0",
+ "picomatch": "^4.0.4",
+ "postcss": "^8.5.8",
+ "rolldown": "1.0.0-rc.12",
"tinyglobby": "^0.2.15"
},
"bin": {
@@ -4673,9 +5427,10 @@
},
"peerDependencies": {
"@types/node": "^20.19.0 || >=22.12.0",
+ "@vitejs/devtools": "^0.1.0",
+ "esbuild": "^0.27.0",
"jiti": ">=1.21.0",
"less": "^4.0.0",
- "lightningcss": "^1.21.0",
"sass": "^1.70.0",
"sass-embedded": "^1.70.0",
"stylus": ">=0.54.8",
@@ -4688,13 +5443,16 @@
"@types/node": {
"optional": true
},
- "jiti": {
+ "@vitejs/devtools": {
"optional": true
},
- "less": {
+ "esbuild": {
"optional": true
},
- "lightningcss": {
+ "jiti": {
+ "optional": true
+ },
+ "less": {
"optional": true
},
"sass": {
diff --git a/package.json b/package.json
index 10964cc..63002d5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "date-and-time",
- "version": "4.3.1",
+ "version": "4.4.0",
"description": "The simplest, most intuitive date and time library",
"keywords": [
"date",
@@ -91,18 +91,18 @@
"@rollup/plugin-alias": "^6.0.0",
"@rollup/plugin-terser": "^1.0.0",
"@stylistic/eslint-plugin": "^5.10.0",
- "@types/node": "^25.3.5",
- "@vitest/coverage-v8": "^4.0.18",
- "eslint": "^10.0.3",
+ "@types/node": "^25.5.0",
+ "@vitest/coverage-v8": "^4.1.2",
+ "eslint": "^10.1.0",
"glob": "^13.0.6",
"prettier": "^3.8.1",
- "rollup": "^4.59.0",
- "rollup-plugin-dts": "^6.3.0",
+ "rollup": "^4.60.0",
+ "rollup-plugin-dts": "^6.4.1",
"rollup-plugin-esbuild": "^6.2.1",
"tsx": "^4.21.0",
- "typescript-eslint": "^8.56.1",
+ "typescript-eslint": "^8.57.2",
"vitepress": "^1.6.4",
- "vitest": "^4.0.18"
+ "vitest": "^4.1.2"
},
"overrides": {
"esbuild": "^0.25.0"
diff --git a/src/index.ts b/src/index.ts
index 17e06bc..6511886 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -13,4 +13,10 @@ export { addSeconds } from './addSeconds.ts';
export { addMilliseconds } from './addMilliseconds.ts';
export { Duration } from './duration.ts';
export { subtract } from './subtract.ts';
-export { isLeapYear, isSameDay } from './utils.ts';
+export {
+ isLeapYear,
+ isSameDay,
+ getDaysInMonth,
+ getISOWeekYear,
+ getISOWeek
+} from './utils.ts';
diff --git a/src/isValid.ts b/src/isValid.ts
index b7e6a21..554cec9 100644
--- a/src/isValid.ts
+++ b/src/isValid.ts
@@ -1,12 +1,9 @@
import { preparse } from './preparse.ts';
-import { CompiledObject } from './compile.ts';
+import { getDaysInMonth } from './utils.ts';
+import type { CompiledObject } from './compile.ts';
import type { ParserOptions } from './parser.ts';
import type { PreparseResult } from './preparse.ts';
-const getLastDayOfMonth = (year: number, month: number) => {
- return new Date(Date.UTC(year, month - (year < 100 ? 1900 * 12 : 0), 0)).getUTCDate();
-};
-
/**
* Validates whether a preparse result object is valid.
* @param pr - The preparse result object to validate
@@ -25,7 +22,7 @@ export function validatePreparseResult(pr: PreparseResult, options?: ParserOptio
&& pr._match > 0
&& range(y, 1, 9999)
&& range(pr.M, 1, 12)
- && range(pr.D, 1, getLastDayOfMonth(y, pr.M ?? 1))
+ && range(pr.D, 1, getDaysInMonth(y, pr.M ?? 1))
&& range(pr.H, min24, max24)
&& range(pr.A, 0, 1)
&& range(pr.h, min12, max12)
diff --git a/src/plugins/quarter.ts b/src/plugins/quarter.ts
new file mode 100644
index 0000000..e1e5e01
--- /dev/null
+++ b/src/plugins/quarter.ts
@@ -0,0 +1,10 @@
+import { FormatterPlugin } from '@/plugin.ts';
+import type { DateLike } from '@/plugin.ts';
+
+class Formatter extends FormatterPlugin {
+ Q (d: DateLike) {
+ return String((d.getMonth() / 3 | 0) + 1);
+ }
+}
+
+export const formatter = new Formatter();
diff --git a/src/plugins/timestamp.ts b/src/plugins/timestamp.ts
new file mode 100644
index 0000000..1aedfce
--- /dev/null
+++ b/src/plugins/timestamp.ts
@@ -0,0 +1,14 @@
+import { FormatterPlugin } from '@/plugin.ts';
+import type { DateLike } from '@/plugin.ts';
+
+class Formatter extends FormatterPlugin {
+ t (d: DateLike) {
+ return String(Math.floor(d.getTime() / 1000));
+ }
+
+ T (d: DateLike) {
+ return String(d.getTime());
+ }
+}
+
+export const formatter = new Formatter();
diff --git a/src/plugins/week.ts b/src/plugins/week.ts
new file mode 100644
index 0000000..5677776
--- /dev/null
+++ b/src/plugins/week.ts
@@ -0,0 +1,31 @@
+import { FormatterPlugin } from '@/plugin.ts';
+import { getISOWeekYear, getISOWeek } from '@/utils.ts';
+import type { DateLike } from '@/plugin.ts';
+
+const _getISOWeekYear = (d: DateLike) => getISOWeekYear(d.getFullYear(), d.getMonth() + 1, d.getDate());
+
+const _getISOWeek = (d: DateLike) => getISOWeek(d.getFullYear(), d.getMonth() + 1, d.getDate());
+
+class Formatter extends FormatterPlugin {
+ W (d: DateLike) {
+ return String(_getISOWeek(d));
+ }
+
+ WW (d: DateLike) {
+ return `0${String(_getISOWeek(d))}`.slice(-2);
+ }
+
+ GGGG (d: DateLike) {
+ return `000${String(_getISOWeekYear(d))}`.slice(-4);
+ }
+
+ GG (d: DateLike) {
+ return `0${String(_getISOWeekYear(d))}`.slice(-2);
+ }
+
+ G (d: DateLike) {
+ return String(_getISOWeekYear(d));
+ }
+}
+
+export const formatter = new Formatter();
diff --git a/src/utils.ts b/src/utils.ts
index 8281183..ae20dcf 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -1,6 +1,6 @@
/**
* Determines if the specified year is a leap year.
- * @param year - The year to check
+ * @param year - The gregorian year to check for leap year status (1-9999)
* @returns True if the year is a leap year, false otherwise
*/
export const isLeapYear = (year: number) => {
@@ -16,3 +16,97 @@ export const isLeapYear = (year: number) => {
export const isSameDay = (date1: Date, date2: Date) => {
return date1.toDateString() === date2.toDateString();
};
+
+// The toUTC function converts a given year, month, and day into a UTC timestamp.
+// The `m` parameter is 0-indexed (0 = January, 11 = December), matching the convention of Date.UTC.
+const toUTC = (y: number, m: number, d: number) => Date.UTC(y, m - (y < 100 ? 1900 * 12 : 0), d);
+
+/**
+ * Returns the number of days in a given month of a specific year.
+ * @param date - The date to get the number of days for
+ * @returns The number of days in the month of the provided date
+ */
+export function getDaysInMonth (date: Date): number;
+
+/**
+ * Returns the number of days in a given month of a specific year.
+ * @param year - The gregorian year (1-9999) to get the number of days for
+ * @param month - The month (1-12) to get the number of days for
+ * @returns The number of days in the month of the provided date
+ */
+export function getDaysInMonth (year: number, month: number): number;
+
+export function getDaysInMonth (...args: [date: Date] | [year: number, month: number]) {
+ const [year, month] = (
+ () => args.length === 1
+ ? [args[0].getFullYear(), args[0].getMonth() + 1]
+ : args
+ )();
+ // month is 1-indexed here; day 0 of next month = last day of current month
+ return new Date(toUTC(year, month, 0)).getUTCDate();
+}
+
+// The getThursdayOfWeek function calculates the Thursday of the week for a given time.
+// This is used as an anchor point to determine the ISO week number and ISO week year,
+// since the ISO week starts on Monday and ends on Sunday,
+// and Thursday is always in the same ISO week as the given date.
+const getThursdayOfWeek = (time: number) => {
+ const target = new Date(time);
+ // getUTCDay() returns 0 for Sunday, so we use (day || 7) to treat Sunday as the 7th day of the week
+ target.setUTCDate(target.getUTCDate() + (4 - (target.getUTCDay() || 7)));
+ return target;
+};
+
+/**
+ * Calculates the ISO week year for a given date.
+ * @param date - The date to calculate the ISO week year for
+ * @returns The ISO week year corresponding to the provided date
+ */
+export function getISOWeekYear (date: Date): number;
+
+/**
+ * Calculates the ISO week year for a given year, month, and day.
+ * @param year - The gregorian year (1-9999) to calculate the ISO week year for
+ * @param month - The month (1-12) to calculate the ISO week year for
+ * @param day - The day (1-31) to calculate the ISO week year for
+ * @returns The ISO week year corresponding to the provided date
+ */
+export function getISOWeekYear (year: number, month: number, day: number): number;
+
+export function getISOWeekYear (...args: [date: Date] | [year: number, month: number, day: number]) {
+ const [year, month, day] = (
+ () => args.length === 1
+ ? [args[0].getFullYear(), args[0].getMonth() + 1, args[0].getDate()]
+ : args
+ )();
+ // The ISO week year is the year that contains the Thursday of the week
+ return getThursdayOfWeek(toUTC(year, month - 1, day)).getUTCFullYear();
+}
+
+/**
+ * Calculates the ISO week number for a given date.
+ * @param date - The date to calculate the ISO week number for
+ * @returns The ISO week number corresponding to the provided date
+ */
+export function getISOWeek (date: Date): number;
+
+/**
+ * Calculates the ISO week number for a given year, month, and day.
+ * @param year - The gregorian year (1-9999) to calculate the ISO week number for
+ * @param month - The month (1-12) to calculate the ISO week number for
+ * @param day - The day (1-31) to calculate the ISO week number for
+ * @returns The ISO week number corresponding to the provided date
+ */
+export function getISOWeek (year: number, month: number, day: number): number;
+
+export function getISOWeek (...args: [date: Date] | [year: number, month: number, day: number]) {
+ const [year, month, day] = (
+ () => args.length === 1
+ ? [args[0].getFullYear(), args[0].getMonth() + 1, args[0].getDate()]
+ : args
+ )();
+ const target = getThursdayOfWeek(toUTC(year, month - 1, day));
+ // Calculate the ISO week number by finding the difference in weeks between the target date
+ // and the Thursday of the first week of the year (January 4th)
+ return Math.round((target.getTime() - getThursdayOfWeek(toUTC(target.getUTCFullYear(), 0, 4)).getTime()) / 86400000 / 7) + 1;
+}
diff --git a/src/zonenames.ts b/src/zonenames.ts
index d630fae..e71c3b2 100644
--- a/src/zonenames.ts
+++ b/src/zonenames.ts
@@ -16,6 +16,8 @@ export default {
'American Samoa Standard Time': 'SST',
'Anadyr Standard Time': 'ANAT',
'Anadyr Summer Time': 'ANAST',
+ 'Apia Daylight Time': 'WSDT',
+ 'Apia Standard Time': 'WSST',
'Aqtau Standard Time': 'AQTT',
'Aqtau Summer Time': 'AQTST',
'Aqtobe Standard Time': 'AQTT',
@@ -47,6 +49,7 @@ export default {
'Brasilia Standard Time': 'BRT',
'Brasilia Summer Time': 'BRST',
'British Summer Time': 'BST',
+ 'Brunei Darussalam Time': 'BNT',
'Brunei Time': 'BNT',
'Cape Verde Standard Time': 'CVT',
'Casey Time': 'CAST',
@@ -63,11 +66,14 @@ export default {
'Chile Summer Time': 'CLST',
'China Daylight Time': 'CDT',
'China Standard Time': 'CST',
+ 'Choibalsan Standard Time': 'CHOT',
+ 'Choibalsan Summer Time': 'CHOST',
'Christmas Island Time': 'CXT',
'Chuuk Time': 'CHUT',
'Cocos Islands Time': 'CCT',
'Colombia Standard Time': 'COT',
'Colombia Summer Time': 'COST',
+ 'Cook Islands Half Summer Time': 'CKHST',
'Cook Islands Standard Time': 'CKT',
'Cook Islands Summer Time': 'CKST',
'Coordinated Universal Time': 'UTC',
@@ -75,10 +81,12 @@ export default {
'Cuba Standard Time': 'CST',
'Davis Time': 'DAVT',
'Dumont d’Urville Time': 'DDUT',
+ 'Dumont-d’Urville Time': 'DDUT',
'East Africa Time': 'EAT',
'East Greenland Standard Time': 'EGT',
'East Greenland Summer Time': 'EGST',
'East Kazakhstan Time': 'ALMT',
+ 'East Timor Time': 'TLT',
'Easter Island Standard Time': 'EAST',
'Easter Island Summer Time': 'EASST',
'Eastern Daylight Time': 'EDT',
@@ -87,7 +95,7 @@ export default {
'Eastern Indonesia Time': 'WIT',
'Eastern Standard Time': 'EST',
'Ecuador Time': 'ECT',
- 'Falkland Islands Standard Time': 'FKST',
+ 'Falkland Islands Standard Time': 'FKT',
'Falkland Islands Summer Time': 'FKST',
'Fernando de Noronha Standard Time': 'FNT',
'Fernando de Noronha Summer Time': 'FNST',
@@ -101,14 +109,14 @@ export default {
'Georgia Standard Time': 'GET',
'Georgia Summer Time': 'GEST',
'Gilbert Islands Time': 'GILT',
- 'Greenland Standard Time': 'GT',
- 'Greenland Summer Time': 'GST',
+ 'Greenland Standard Time': 'WGT',
+ 'Greenland Summer Time': 'WGST',
'Greenwich Mean Time': 'GMT',
'Guam Standard Time': 'ChST',
'Gulf Standard Time': 'GST',
'Guyana Time': 'GYT',
- 'Hawaii-Aleutian Daylight Time': 'HADT',
- 'Hawaii-Aleutian Standard Time': 'HAST',
+ 'Hawaii-Aleutian Daylight Time': 'HDT',
+ 'Hawaii-Aleutian Standard Time': 'HST',
'Hong Kong Standard Time': 'HKT',
'Hong Kong Summer Time': 'HKST',
'Hovd Standard Time': 'HOVT',
@@ -127,18 +135,22 @@ export default {
'Kamchatka Standard Time': 'PETT',
'Kamchatka Summer Time': 'PETST',
'Kazakhstan Time': 'KZT',
+ 'Khovd Standard Time': 'HOVT',
+ 'Khovd Summer Time': 'HOVST',
'Korean Daylight Time': 'KDT',
'Korean Standard Time': 'KST',
'Kosrae Time': 'KOST',
'Krasnoyarsk Standard Time': 'KRAT',
'Krasnoyarsk Summer Time': 'KRAST',
'Kyrgyzstan Time': 'KGT',
+ 'Kyzylorda Standard Time': 'QYZT',
+ 'Kyzylorda Summer Time': 'QYZST',
'Lanka Time': 'LKT',
'Line Islands Time': 'LINT',
'Lord Howe Daylight Time': 'LHDT',
'Lord Howe Standard Time': 'LHST',
'Macao Standard Time': 'CST',
- 'Macao Summer Time': 'CST',
+ 'Macao Summer Time': 'CDT',
'Magadan Standard Time': 'MAGT',
'Magadan Summer Time': 'MAGST',
'Malaysia Time': 'MYT',
@@ -167,7 +179,8 @@ export default {
'Norfolk Island Daylight Time': 'NFDT',
'Norfolk Island Standard Time': 'NFT',
'North Korea Time': 'KST',
- 'Northern Mariana Islands Time': 'CHST',
+ 'North Mariana Islands Time': 'ChST',
+ 'Northern Mariana Islands Time': 'ChST',
'Novosibirsk Standard Time': 'NOVT',
'Novosibirsk Summer Time': 'NOVST',
'Omsk Standard Time': 'OMST',
@@ -182,11 +195,15 @@ export default {
'Paraguay Summer Time': 'PYST',
'Peru Standard Time': 'PET',
'Peru Summer Time': 'PEST',
- 'Philippine Standard Time': 'PST',
+ 'Petropavlovsk-Kamchatski Standard Time': 'PETT',
+ 'Petropavlovsk-Kamchatski Summer Time': 'PETST',
+ 'Philippine Standard Time': 'PHT',
'Philippine Summer Time': 'PHST',
'Phoenix Islands Time': 'PHOT',
- 'Pitcairn Time': 'PIT',
+ 'Pitcairn Time': 'PST',
'Pohnpei Time': 'PONT',
+ 'Ponape Time': 'PONT',
+ 'Pyongyang Time': 'KST',
'Qyzylorda Standard Time': 'QYZT',
'Qyzylorda Summer Time': 'QYZST',
'Réunion Time': 'RET',
@@ -207,6 +224,8 @@ export default {
'Suriname Time': 'SRT',
'Syowa Time': 'SYOT',
'Tahiti Time': 'TAHT',
+ 'Taipei Daylight Time': 'CDT',
+ 'Taipei Standard Time': 'CST',
'Taiwan Daylight Time': 'CDT',
'Taiwan Standard Time': 'CST',
'Tajikistan Time': 'TJT',
@@ -214,6 +233,8 @@ export default {
'Tokelau Time': 'TKT',
'Tonga Standard Time': 'TOT',
'Tonga Summer Time': 'TOST',
+ 'Türkiye Standard Time': 'TRT',
+ 'Türkiye Summer Time': 'TRST',
'Turkmenistan Standard Time': 'TMT',
'Tuvalu Time': 'TVT',
'Ulaanbaatar Standard Time': 'ULAT',
@@ -234,11 +255,12 @@ export default {
'Wallis & Futuna Time': 'WFT',
'West Africa Standard Time': 'WAT',
'West Africa Summer Time': 'WAST',
+ 'West Africa Time': 'WAT',
'West Greenland Standard Time': 'WGT',
'West Greenland Summer Time': 'WGST',
'West Kazakhstan Time': 'AQTT',
- 'Western Argentina Standard Time': 'ART',
- 'Western Argentina Summer Time': 'ARST',
+ 'Western Argentina Standard Time': 'WART',
+ 'Western Argentina Summer Time': 'WARST',
'Western European Standard Time': 'WET',
'Western European Summer Time': 'WEST',
'Western Indonesia Time': 'WIB',
diff --git a/tests/plugins/quarter.spec.ts b/tests/plugins/quarter.spec.ts
new file mode 100644
index 0000000..eb96475
--- /dev/null
+++ b/tests/plugins/quarter.spec.ts
@@ -0,0 +1,28 @@
+import { describe, expect, test } from 'vitest';
+import { format } from '@/index.ts';
+import { formatter } from '@/plugins/quarter.ts';
+
+describe('plugins', () => {
+ describe('formatter', () => {
+ test('Q — first month of each quarter', () => {
+ expect(format(new Date(2025, 0, 1), 'Q', { plugins: [formatter] })).toBe('1'); // Jan → Q1
+ expect(format(new Date(2025, 3, 1), 'Q', { plugins: [formatter] })).toBe('2'); // Apr → Q2
+ expect(format(new Date(2025, 6, 1), 'Q', { plugins: [formatter] })).toBe('3'); // Jul → Q3
+ expect(format(new Date(2025, 9, 1), 'Q', { plugins: [formatter] })).toBe('4'); // Oct → Q4
+ });
+
+ test('Q — last month of each quarter', () => {
+ expect(format(new Date(2025, 2, 31), 'Q', { plugins: [formatter] })).toBe('1'); // Mar → Q1
+ expect(format(new Date(2025, 5, 30), 'Q', { plugins: [formatter] })).toBe('2'); // Jun → Q2
+ expect(format(new Date(2025, 8, 30), 'Q', { plugins: [formatter] })).toBe('3'); // Sep → Q3
+ expect(format(new Date(2025, 11, 31), 'Q', { plugins: [formatter] })).toBe('4'); // Dec → Q4
+ });
+
+ test('Q — middle month of each quarter', () => {
+ expect(format(new Date(2025, 1, 14), 'Q', { plugins: [formatter] })).toBe('1'); // Feb → Q1
+ expect(format(new Date(2025, 4, 15), 'Q', { plugins: [formatter] })).toBe('2'); // May → Q2
+ expect(format(new Date(2025, 7, 16), 'Q', { plugins: [formatter] })).toBe('3'); // Aug → Q3
+ expect(format(new Date(2025, 10, 11), 'Q', { plugins: [formatter] })).toBe('4'); // Nov → Q4
+ });
+ });
+});
diff --git a/tests/plugins/timestamp.spec.ts b/tests/plugins/timestamp.spec.ts
new file mode 100644
index 0000000..b610991
--- /dev/null
+++ b/tests/plugins/timestamp.spec.ts
@@ -0,0 +1,28 @@
+import { describe, expect, test, beforeAll } from 'vitest';
+import { format } from '@/index.ts';
+import { formatter } from '@/plugins/timestamp.ts';
+
+beforeAll(() => (process.env.TZ = 'UTC'));
+
+describe('plugins', () => {
+ describe('formatter', () => {
+ test('t — Unix timestamp in seconds (floor)', () => {
+ expect(format(new Date(0), 't', { plugins: [formatter] })).toBe('0'); // epoch
+ expect(format(new Date(1000), 't', { plugins: [formatter] })).toBe('1'); // exactly 1 second
+ expect(format(new Date(999), 't', { plugins: [formatter] })).toBe('0'); // just under 1 second → floor
+ expect(format(new Date(1999), 't', { plugins: [formatter] })).toBe('1'); // 1.999 s → floor to 1
+ expect(format(new Date(1000000000000), 't', { plugins: [formatter] })).toBe('1000000000'); // Sep 9, 2001
+ expect(format(new Date(-1), 't', { plugins: [formatter] })).toBe('-1'); // -1ms → floor to -1s
+ expect(format(new Date(-1500), 't', { plugins: [formatter] })).toBe('-2'); // -1.5s → floor to -2s
+ expect(format(new Date(-1000), 't', { plugins: [formatter] })).toBe('-1'); // exactly -1s
+ expect(format(new Date(2147483648000), 't', { plugins: [formatter] })).toBe('2147483648'); // year 2038+
+ });
+
+ test('T — Unix timestamp in milliseconds', () => {
+ expect(format(new Date(0), 'T', { plugins: [formatter] })).toBe('0'); // epoch
+ expect(format(new Date(1000), 'T', { plugins: [formatter] })).toBe('1000'); // 1 second
+ expect(format(new Date(999), 'T', { plugins: [formatter] })).toBe('999'); // 999 ms
+ expect(format(new Date(1000000000000), 'T', { plugins: [formatter] })).toBe('1000000000000');
+ });
+ });
+});
diff --git a/tests/plugins/week.spec.ts b/tests/plugins/week.spec.ts
new file mode 100644
index 0000000..3d68ef0
--- /dev/null
+++ b/tests/plugins/week.spec.ts
@@ -0,0 +1,80 @@
+import { describe, expect, test } from 'vitest';
+import { format } from '@/index.ts';
+import { formatter } from '@/plugins/week.ts';
+
+describe('plugins', () => {
+ describe('formatter', () => {
+ test('W', () => {
+ // 2024-01-01 is Monday - ISO week year equals calendar year, no offset bug
+ expect(format(new Date(2024, 0, 1), 'W', { plugins: [formatter] })).toBe('1');
+ // last day of ISO week 1 (Sunday)
+ expect(format(new Date(2024, 0, 7), 'W', { plugins: [formatter] })).toBe('1');
+ // first day of ISO week 2 (Monday)
+ expect(format(new Date(2024, 0, 8), 'W', { plugins: [formatter] })).toBe('2');
+ // mid-year (Thursday is the anchor day of its own ISO week)
+ expect(format(new Date(2024, 6, 4), 'W', { plugins: [formatter] })).toBe('27');
+ // late December still in ISO week year 2024
+ expect(format(new Date(2024, 11, 23), 'W', { plugins: [formatter] })).toBe('52');
+ // Dec 30, 2024 (Monday) belongs to ISO week 1 of 2025
+ expect(format(new Date(2024, 11, 30), 'W', { plugins: [formatter] })).toBe('1');
+ // Jan 1, 2021 (Friday) belongs to ISO week 53 of 2020
+ expect(format(new Date(2021, 0, 1), 'W', { plugins: [formatter] })).toBe('53');
+ // Dec 31, 2015 (Thursday) belongs to ISO week 53 of 2015
+ expect(format(new Date(2015, 11, 31), 'W', { plugins: [formatter] })).toBe('53');
+ // Jan 6, 2025 (Monday) is ISO week 2 of 2025
+ expect(format(new Date(2025, 0, 6), 'W', { plugins: [formatter] })).toBe('2');
+ });
+
+ test('WW', () => {
+ expect(format(new Date(2024, 0, 1), 'WW', { plugins: [formatter] })).toBe('01');
+ expect(format(new Date(2024, 0, 8), 'WW', { plugins: [formatter] })).toBe('02');
+ expect(format(new Date(2024, 6, 4), 'WW', { plugins: [formatter] })).toBe('27');
+ expect(format(new Date(2024, 11, 23), 'WW', { plugins: [formatter] })).toBe('52');
+ expect(format(new Date(2021, 0, 1), 'WW', { plugins: [formatter] })).toBe('53');
+ });
+
+ test('GGGG', () => {
+ // ISO week year equals calendar year
+ expect(format(new Date(2024, 0, 1), 'GGGG', { plugins: [formatter] })).toBe('2024');
+ // Dec 30, 2024 crosses into ISO week year 2025
+ expect(format(new Date(2024, 11, 30), 'GGGG', { plugins: [formatter] })).toBe('2025');
+ // Jan 1, 2021 crosses back into ISO week year 2020
+ expect(format(new Date(2021, 0, 1), 'GGGG', { plugins: [formatter] })).toBe('2020');
+ });
+
+ test('GG', () => {
+ expect(format(new Date(2024, 0, 1), 'GG', { plugins: [formatter] })).toBe('24');
+ expect(format(new Date(2024, 11, 30), 'GG', { plugins: [formatter] })).toBe('25');
+ expect(format(new Date(2021, 0, 1), 'GG', { plugins: [formatter] })).toBe('20');
+ });
+
+ test('GGGG and YYYY differ at year boundaries', () => {
+ // Dec 30, 2024: calendar year = 2024, ISO week year = 2025
+ expect(format(new Date(2024, 11, 30), 'YYYY GGGG', { plugins: [formatter] })).toBe('2024 2025');
+ });
+
+ test('edge cases - min date', () => {
+ const minDate = new Date(1, 0 - 1900 * 12, 1);
+
+ // Jan 1, year 1 (Monday): Thursday of that week is Jan 4, year 1
+ // → ISO week year = 1, first week of year 1
+ expect(format(minDate, 'GGGG', { plugins: [formatter] })).toBe('0001');
+ expect(format(minDate, 'GG', { plugins: [formatter] })).toBe('01');
+ expect(format(minDate, 'G', { plugins: [formatter] })).toBe('1');
+ expect(format(minDate, 'W', { plugins: [formatter] })).toBe('1');
+ expect(format(minDate, 'WW', { plugins: [formatter] })).toBe('01');
+ });
+
+ test('edge cases - year 9999', () => {
+ const maxDate = new Date(9999, 11, 31);
+
+ // Dec 31, 9999 (Friday): Thursday of that week is Dec 30, 9999
+ // → ISO week year = 9999 (does NOT cross into 10000)
+ expect(format(maxDate, 'GGGG', { plugins: [formatter] })).toBe('9999');
+ expect(format(maxDate, 'GG', { plugins: [formatter] })).toBe('99');
+ expect(format(maxDate, 'G', { plugins: [formatter] })).toBe('9999');
+ expect(format(maxDate, 'W', { plugins: [formatter] })).toBe('52');
+ expect(format(maxDate, 'WW', { plugins: [formatter] })).toBe('52');
+ });
+ });
+});
diff --git a/tests/utils.spec.ts b/tests/utils.spec.ts
index 1904ba4..1deaa0e 100644
--- a/tests/utils.spec.ts
+++ b/tests/utils.spec.ts
@@ -1,5 +1,5 @@
-import { expect, test } from 'vitest';
-import { isLeapYear, isSameDay } from '@/index.ts';
+import { describe, expect, test } from 'vitest';
+import { isLeapYear, isSameDay, getDaysInMonth, getISOWeekYear, getISOWeek } from '@/index.ts';
test('isLeapYear', () => {
expect(isLeapYear(4)).toBe(true);
@@ -20,3 +20,111 @@ test('isSameDay', () => {
expect(isSameDay(date3, date4)).toBe(false);
});
+
+describe('getDaysInMonth', () => {
+ test('Date overload', () => {
+ expect(getDaysInMonth(new Date(2024, 0, 15))).toBe(31); // Jan
+ expect(getDaysInMonth(new Date(2024, 1, 15))).toBe(29); // Feb (leap year)
+ expect(getDaysInMonth(new Date(2025, 1, 15))).toBe(28); // Feb (non-leap year)
+ expect(getDaysInMonth(new Date(2024, 3, 15))).toBe(30); // Apr
+ expect(getDaysInMonth(new Date(2024, 11, 15))).toBe(31); // Dec
+ });
+
+ test('(year, month) overload', () => {
+ expect(getDaysInMonth(2024, 1)).toBe(31); // Jan
+ expect(getDaysInMonth(2024, 2)).toBe(29); // Feb (leap year)
+ expect(getDaysInMonth(2025, 2)).toBe(28); // Feb (non-leap year)
+ expect(getDaysInMonth(2024, 4)).toBe(30); // Apr
+ expect(getDaysInMonth(2024, 12)).toBe(31); // Dec
+ });
+
+ test('leap year rules', () => {
+ expect(getDaysInMonth(2000, 2)).toBe(29); // divisible by 400 → leap
+ expect(getDaysInMonth(2100, 2)).toBe(28); // divisible by 100, not 400 → non-leap
+ expect(getDaysInMonth(2400, 2)).toBe(29); // divisible by 400 → leap
+ expect(getDaysInMonth(2024, 2)).toBe(29); // divisible by 4, not 100 → leap
+ expect(getDaysInMonth(2023, 2)).toBe(28); // not divisible by 4 → non-leap
+ });
+
+ test('Date overload for year < 100', () => {
+ // year 4 is a leap year
+ const date = new Date(4, 1 - 1900 * 12, 15);
+
+ expect(getDaysInMonth(date)).toBe(29);
+ });
+});
+
+describe('getISOWeekYear', () => {
+ test('Date overload', () => {
+ expect(getISOWeekYear(new Date(2024, 0, 1))).toBe(2024); // Mon Jan 1 → week 1 of 2024
+ expect(getISOWeekYear(new Date(2024, 11, 29))).toBe(2024); // Sun Dec 29 → week 52 of 2024
+ expect(getISOWeekYear(new Date(2024, 11, 30))).toBe(2025); // Mon Dec 30 → week 1 of 2025
+ expect(getISOWeekYear(new Date(2021, 0, 1))).toBe(2020); // Fri Jan 1 → week 53 of 2020
+ });
+
+ test('(year, month, day) overload', () => {
+ expect(getISOWeekYear(2024, 1, 1)).toBe(2024); // Jan 1
+ expect(getISOWeekYear(2024, 12, 30)).toBe(2025); // Dec 30
+ expect(getISOWeekYear(2021, 1, 1)).toBe(2020); // Jan 1
+ });
+
+ test('Date overload for year < 100', () => {
+ // year 3: Dec 29 is a Monday → its Thursday is Jan 1 of year 4 → iso year = 4
+ const date1 = new Date(3, 11 - 1900 * 12, 29);
+
+ expect(getISOWeekYear(date1)).toBe(4);
+
+ // year 4: Jan 5 is a Monday → belongs to week 2 of year 4
+ const date2 = new Date(4, 0 - 1900 * 12, 5);
+
+ expect(getISOWeekYear(date2)).toBe(4);
+ });
+
+ test('(year, month, day) overload for year < 100', () => {
+ // year 3: Dec 29 is a Monday → its Thursday is Jan 1 of year 4 → iso year = 4
+ expect(getISOWeekYear(3, 12, 29)).toBe(4);
+
+ // year 4: Jan 5 is a Monday → belongs to week 2 of year 4
+ expect(getISOWeekYear(4, 1, 5)).toBe(4);
+ });
+});
+
+describe('getISOWeek', () => {
+ test('Date overload', () => {
+ expect(getISOWeek(new Date(2024, 0, 1))).toBe(1); // Mon Jan 1 → week 1
+ expect(getISOWeek(new Date(2024, 0, 7))).toBe(1); // Sun Jan 7 → still week 1
+ expect(getISOWeek(new Date(2024, 0, 8))).toBe(2); // Mon Jan 8 → week 2
+ expect(getISOWeek(new Date(2024, 6, 4))).toBe(27); // Thu Jul 4 → week 27
+ expect(getISOWeek(new Date(2024, 11, 23))).toBe(52); // Mon Dec 23 → week 52
+ expect(getISOWeek(new Date(2024, 11, 30))).toBe(1); // Mon Dec 30 → week 1 of 2025
+ expect(getISOWeek(new Date(2021, 0, 1))).toBe(53); // Fri Jan 1 → week 53 of 2020
+ expect(getISOWeek(new Date(2015, 11, 31))).toBe(53); // Thu Dec 31 → week 53 of 2015
+ });
+
+ test('(year, month, day) overload', () => {
+ expect(getISOWeek(2024, 1, 1)).toBe(1); // Jan 1
+ expect(getISOWeek(2024, 1, 8)).toBe(2); // Jan 8
+ expect(getISOWeek(2024, 7, 4)).toBe(27); // Jul 4
+ expect(getISOWeek(2021, 1, 1)).toBe(53); // Jan 1
+ });
+
+ test('Date overload for year < 100', () => {
+ // year 4: Jan 5 is a Monday → belongs to week 2 of year 4
+ const date1 = new Date(4, 0 - 1900 * 12, 5);
+
+ expect(getISOWeek(date1)).toBe(2);
+
+ // year 4: Dec 31 is a Friday → its Thursday is Dec 30 → week 53 of year 4
+ const date2 = new Date(4, 11 - 1900 * 12, 31);
+
+ expect(getISOWeek(date2)).toBe(53);
+ });
+
+ test('(year, month, day) overload for year < 100', () => {
+ // year 4: Jan 5 is a Monday → belongs to week 2 of year 4
+ expect(getISOWeek(4, 1, 5)).toBe(2);
+
+ // year 4: Dec 31 is a Friday → its Thursday is Dec 30 → week 53 of year 4
+ expect(getISOWeek(4, 12, 31)).toBe(53);
+ });
+});
diff --git a/tools/zonename.ts b/tools/zonename.ts
index 5f7d073..40cea14 100644
--- a/tools/zonename.ts
+++ b/tools/zonename.ts
@@ -29,10 +29,12 @@ const getTimezone = async (path: string) => {
}
};
+// Extract the timezone name from the formatted date parts
const getTimezoneName = (dtf: Intl.DateTimeFormat, time: number) => {
return dtf.formatToParts(time).find(part => part.type === 'timeZoneName')?.value.replace(/^GMT([+-].+)?$/, '') ?? '';
};
+// Extract timezone names and their abbreviations by analyzing historical time periods
const getTimezoneNames = (timeZone: string, names: Record) => {
const dtf = new Intl.DateTimeFormat('en-US', { timeZone, timeZoneName: 'long' });
const map = new Map();
@@ -79,6 +81,7 @@ const timezones = await getTimezone(path);
const timeZoneNames = new Map();
const errorNames = new Set();
+// Extract timezone names and their abbreviations by analyzing historical time periods
timezones.forEach(timeZone => {
const { names, errors } = getTimezoneNames(timeZone, zonenames);
@@ -88,9 +91,18 @@ timezones.forEach(timeZone => {
errors.forEach(err => errorNames.add(err));
});
+// Add missing timezone names from the existing mapping
+for (const [key, value] of Object.entries(zonenames)) {
+ if (!timeZoneNames.has(key)) {
+ timeZoneNames.set(key, value);
+ }
+}
+
if (errorNames.size) {
+ // Log any timezone names that were not found in the existing mapping
console.error('Not Found');
console.error(Array.from(errorNames));
} else {
+ // Output the final mapping of timezone long names to their abbreviations
process.stdout.write(await format(sort(timeZoneNames)));
}
diff --git a/vitest.config.ts b/vitest.config.ts
index dec0307..b63d31c 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -2,10 +2,6 @@ import { defineConfig } from 'vitest/config';
import { resolve } from 'path';
export default defineConfig({
- esbuild: {
- target: 'es2021',
- sourcemap: true
- },
resolve: {
alias: {
'@': resolve(__dirname, './src')