date-vir 5.3.2 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-MIT +1 -1
- package/README.md +28 -28
- package/dist/date-operations/calculate-relative-date.d.ts +17 -0
- package/dist/{esm/date-operations → date-operations}/calculate-relative-date.js +10 -1
- package/dist/date-operations/combine-dates.d.ts +43 -0
- package/dist/{esm/date-operations → date-operations}/combine-dates.js +6 -4
- package/dist/date-operations/diff-dates.d.ts +95 -0
- package/dist/date-operations/diff-dates.js +124 -0
- package/dist/extra-utils/has-date-props.d.ts +35 -0
- package/dist/extra-utils/has-date-props.js +46 -0
- package/dist/extra-utils/js-date-conversion.d.ts +26 -0
- package/dist/extra-utils/js-date-conversion.js +28 -0
- package/dist/extra-utils/now.d.ts +56 -0
- package/dist/extra-utils/now.js +68 -0
- package/dist/extra-utils/override-date.d.ts +27 -0
- package/dist/extra-utils/override-date.js +27 -0
- package/dist/extra-utils/zero.d.ts +99 -0
- package/dist/extra-utils/zero.js +94 -0
- package/dist/formatting/formatted-string.d.ts +58 -0
- package/dist/formatting/formatted-string.js +73 -0
- package/dist/formatting/html-input.d.ts +30 -0
- package/dist/formatting/html-input.js +47 -0
- package/dist/formatting/relative-string.d.ts +53 -0
- package/dist/formatting/relative-string.js +93 -0
- package/dist/formatting/simple-strings.d.ts +187 -0
- package/dist/formatting/simple-strings.js +120 -0
- package/dist/formatting/string-format-types.d.ts +59 -0
- package/dist/formatting/string-format-types.js +19 -0
- package/dist/formatting/timestamp.d.ts +51 -0
- package/dist/formatting/timestamp.js +61 -0
- package/dist/full-date/create-full-date.d.ts +91 -0
- package/dist/full-date/create-full-date.js +142 -0
- package/dist/full-date/date-like.d.ts +9 -0
- package/dist/{esm/full-date → full-date}/format-presets.d.ts +4 -2
- package/dist/{esm/full-date → full-date}/format-presets.js +4 -2
- package/dist/full-date/full-date-parts.d.ts +48 -0
- package/dist/full-date/full-date-parts.js +45 -0
- package/dist/full-date/full-date-shape.d.ts +106 -0
- package/dist/{esm/full-date → full-date}/full-date-shape.js +15 -22
- package/dist/full-date/is-valid-full-date.d.ts +21 -0
- package/dist/full-date/is-valid-full-date.js +38 -0
- package/dist/full-date/luxon-date-time-conversion.d.ts +19 -0
- package/dist/{esm/full-date → full-date}/luxon-date-time-conversion.js +10 -6
- package/dist/full-date/parsing.d.ts +33 -0
- package/dist/full-date/parsing.js +47 -0
- package/dist/full-date/string-parsing.d.ts +9 -0
- package/dist/{esm/full-date → full-date}/string-parsing.js +6 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +27 -0
- package/dist/locales.d.ts +6 -0
- package/dist/locales.js +7 -0
- package/dist/timezone/timezone-checks.d.ts +21 -0
- package/dist/timezone/timezone-checks.js +34 -0
- package/dist/{esm/timezone → timezone}/timezone-names.d.ts +11 -5
- package/dist/{esm/timezone → timezone}/timezone-names.js +11 -3
- package/dist/timezone/timezones.d.ts +42 -0
- package/dist/timezone/timezones.js +31 -0
- package/package.json +30 -48
- package/cspell.config.cjs +0 -13
- package/dist/cjs/date-operations/calculate-relative-date.js +0 -12
- package/dist/cjs/date-operations/combine-dates.js +0 -50
- package/dist/cjs/date-operations/diff-dates.js +0 -105
- package/dist/cjs/duration/duration-unit.js +0 -41
- package/dist/cjs/duration/duration-utils.js +0 -42
- package/dist/cjs/duration/duration.js +0 -2
- package/dist/cjs/extra-utils/date-transforms.js +0 -8
- package/dist/cjs/extra-utils/has-date-props.js +0 -25
- package/dist/cjs/extra-utils/js-date-conversion.js +0 -8
- package/dist/cjs/extra-utils/now.js +0 -22
- package/dist/cjs/extra-utils/zero.js +0 -31
- package/dist/cjs/formatting/formatted-string.js +0 -34
- package/dist/cjs/formatting/html-input.js +0 -37
- package/dist/cjs/formatting/relative-string.js +0 -77
- package/dist/cjs/formatting/simple-strings.js +0 -58
- package/dist/cjs/formatting/string-format-types.js +0 -9
- package/dist/cjs/formatting/timestamp.js +0 -21
- package/dist/cjs/full-date/create-full-date.js +0 -81
- package/dist/cjs/full-date/date-like.js +0 -2
- package/dist/cjs/full-date/format-presets.js +0 -32
- package/dist/cjs/full-date/full-date-shape.js +0 -54
- package/dist/cjs/full-date/is-valid-full-date.js +0 -28
- package/dist/cjs/full-date/luxon-date-time-conversion.js +0 -43
- package/dist/cjs/full-date/parsing.js +0 -48
- package/dist/cjs/full-date/string-parsing.js +0 -33
- package/dist/cjs/index.js +0 -44
- package/dist/cjs/locales.js +0 -5
- package/dist/cjs/timezone/timezone-checks.js +0 -34
- package/dist/cjs/timezone/timezone-names.js +0 -479
- package/dist/cjs/timezone/timezones.js +0 -14
- package/dist/esm/date-operations/calculate-relative-date.d.ts +0 -8
- package/dist/esm/date-operations/combine-dates.d.ts +0 -35
- package/dist/esm/date-operations/diff-dates.d.ts +0 -66
- package/dist/esm/date-operations/diff-dates.js +0 -100
- package/dist/esm/duration/duration-unit.d.ts +0 -27
- package/dist/esm/duration/duration-unit.js +0 -38
- package/dist/esm/duration/duration-utils.d.ts +0 -11
- package/dist/esm/duration/duration-utils.js +0 -37
- package/dist/esm/duration/duration.d.ts +0 -32
- package/dist/esm/duration/duration.js +0 -1
- package/dist/esm/extra-utils/date-transforms.d.ts +0 -4
- package/dist/esm/extra-utils/date-transforms.js +0 -4
- package/dist/esm/extra-utils/has-date-props.d.ts +0 -9
- package/dist/esm/extra-utils/has-date-props.js +0 -20
- package/dist/esm/extra-utils/js-date-conversion.d.ts +0 -2
- package/dist/esm/extra-utils/js-date-conversion.js +0 -4
- package/dist/esm/extra-utils/now.d.ts +0 -6
- package/dist/esm/extra-utils/now.js +0 -16
- package/dist/esm/extra-utils/zero.d.ts +0 -31
- package/dist/esm/extra-utils/zero.js +0 -26
- package/dist/esm/formatting/formatted-string.d.ts +0 -14
- package/dist/esm/formatting/formatted-string.js +0 -29
- package/dist/esm/formatting/html-input.d.ts +0 -19
- package/dist/esm/formatting/html-input.js +0 -33
- package/dist/esm/formatting/relative-string.d.ts +0 -31
- package/dist/esm/formatting/relative-string.js +0 -73
- package/dist/esm/formatting/simple-strings.d.ts +0 -71
- package/dist/esm/formatting/simple-strings.js +0 -51
- package/dist/esm/formatting/string-format-types.d.ts +0 -7
- package/dist/esm/formatting/string-format-types.js +0 -5
- package/dist/esm/formatting/timestamp.d.ts +0 -6
- package/dist/esm/formatting/timestamp.js +0 -16
- package/dist/esm/full-date/create-full-date.d.ts +0 -21
- package/dist/esm/full-date/create-full-date.js +0 -73
- package/dist/esm/full-date/date-like.d.ts +0 -5
- package/dist/esm/full-date/full-date-shape.d.ts +0 -80
- package/dist/esm/full-date/is-valid-full-date.d.ts +0 -5
- package/dist/esm/full-date/is-valid-full-date.js +0 -22
- package/dist/esm/full-date/luxon-date-time-conversion.d.ts +0 -15
- package/dist/esm/full-date/parsing.d.ts +0 -27
- package/dist/esm/full-date/parsing.js +0 -43
- package/dist/esm/full-date/string-parsing.d.ts +0 -3
- package/dist/esm/index.d.ts +0 -28
- package/dist/esm/index.js +0 -28
- package/dist/esm/locales.d.ts +0 -1
- package/dist/esm/locales.js +0 -2
- package/dist/esm/timezone/timezone-checks.d.ts +0 -17
- package/dist/esm/timezone/timezone-checks.js +0 -29
- package/dist/esm/timezone/timezones.d.ts +0 -480
- package/dist/esm/timezone/timezones.js +0 -11
- package/public/index.css +0 -7
- /package/dist/{esm/full-date → full-date}/date-like.js +0 -0
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseInputElementValue = exports.parseStrangeString = void 0;
|
|
4
|
-
const luxon_1 = require("luxon");
|
|
5
|
-
const run_time_assertions_1 = require("run-time-assertions");
|
|
6
|
-
const create_full_date_1 = require("./create-full-date");
|
|
7
|
-
const luxon_date_time_conversion_1 = require("./luxon-date-time-conversion");
|
|
8
|
-
/**
|
|
9
|
-
* Parses any strangely formatted dateString using the given formatString and timezone.
|
|
10
|
-
*
|
|
11
|
-
* This is much more flexible than createFullDate but createFullDate should be preferred in
|
|
12
|
-
* situations where it works.
|
|
13
|
-
*
|
|
14
|
-
* The formatString input is passed to Luxon. All format options are listed here:
|
|
15
|
-
* https://moment.github.io/luxon/#/parsing?id=table-of-tokens
|
|
16
|
-
*/
|
|
17
|
-
function parseStrangeString({ dateString, formatString, timezone, }) {
|
|
18
|
-
try {
|
|
19
|
-
const dateTime = luxon_1.DateTime.fromFormat(dateString, formatString, {
|
|
20
|
-
zone: timezone,
|
|
21
|
-
setZone: true,
|
|
22
|
-
});
|
|
23
|
-
return (0, luxon_date_time_conversion_1.parseLuxonDateTime)(dateTime);
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
throw new Error(`Failed to parse string '${dateString}' with format '${formatString}'`);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.parseStrangeString = parseStrangeString;
|
|
30
|
-
/**
|
|
31
|
-
* Read either an HTMLInputElement's value directly, or the value string retrieved from an
|
|
32
|
-
* HTMLInputElement. Handles both type="date" and type="time" <input> elements.
|
|
33
|
-
*/
|
|
34
|
-
function parseInputElementValue(elementOrValue, timezone) {
|
|
35
|
-
if (!elementOrValue) {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
const value = (0, run_time_assertions_1.isRunTimeType)(elementOrValue, 'string')
|
|
39
|
-
? elementOrValue
|
|
40
|
-
: elementOrValue.value;
|
|
41
|
-
try {
|
|
42
|
-
return (0, create_full_date_1.createFullDate)(value, timezone);
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.parseInputElementValue = parseInputElementValue;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseDateString = void 0;
|
|
4
|
-
const luxon_1 = require("luxon");
|
|
5
|
-
/**
|
|
6
|
-
* These formats are for luxon, documented here:
|
|
7
|
-
* https://moment.github.io/luxon/#/parsing?id=table-of-tokens
|
|
8
|
-
*/
|
|
9
|
-
const knownStringFormats = [
|
|
10
|
-
// 1-2024
|
|
11
|
-
'L-y',
|
|
12
|
-
// jan-2021
|
|
13
|
-
'LLL-y',
|
|
14
|
-
// january-2021
|
|
15
|
-
'LLLL-y',
|
|
16
|
-
];
|
|
17
|
-
function parseDateString(dateString, timezone) {
|
|
18
|
-
const isoAttempt = luxon_1.DateTime.fromISO(dateString, { zone: timezone });
|
|
19
|
-
if (isoAttempt.isValid) {
|
|
20
|
-
return isoAttempt;
|
|
21
|
-
}
|
|
22
|
-
let finalizedDateTime;
|
|
23
|
-
knownStringFormats.some((format) => {
|
|
24
|
-
const dateTimeAttempt = luxon_1.DateTime.fromFormat(dateString, format, { zone: timezone });
|
|
25
|
-
if (!dateTimeAttempt.isValid) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
finalizedDateTime = dateTimeAttempt;
|
|
29
|
-
return true;
|
|
30
|
-
});
|
|
31
|
-
return finalizedDateTime;
|
|
32
|
-
}
|
|
33
|
-
exports.parseDateString = parseDateString;
|
package/dist/cjs/index.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./date-operations/calculate-relative-date"), exports);
|
|
18
|
-
__exportStar(require("./date-operations/combine-dates"), exports);
|
|
19
|
-
__exportStar(require("./date-operations/diff-dates"), exports);
|
|
20
|
-
__exportStar(require("./duration/duration"), exports);
|
|
21
|
-
__exportStar(require("./duration/duration-unit"), exports);
|
|
22
|
-
__exportStar(require("./duration/duration-utils"), exports);
|
|
23
|
-
__exportStar(require("./extra-utils/date-transforms"), exports);
|
|
24
|
-
__exportStar(require("./extra-utils/has-date-props"), exports);
|
|
25
|
-
__exportStar(require("./extra-utils/js-date-conversion"), exports);
|
|
26
|
-
__exportStar(require("./extra-utils/now"), exports);
|
|
27
|
-
__exportStar(require("./extra-utils/zero"), exports);
|
|
28
|
-
__exportStar(require("./formatting/formatted-string"), exports);
|
|
29
|
-
__exportStar(require("./formatting/html-input"), exports);
|
|
30
|
-
__exportStar(require("./formatting/relative-string"), exports);
|
|
31
|
-
__exportStar(require("./formatting/simple-strings"), exports);
|
|
32
|
-
__exportStar(require("./formatting/string-format-types"), exports);
|
|
33
|
-
__exportStar(require("./formatting/timestamp"), exports);
|
|
34
|
-
__exportStar(require("./full-date/create-full-date"), exports);
|
|
35
|
-
__exportStar(require("./full-date/date-like"), exports);
|
|
36
|
-
__exportStar(require("./full-date/format-presets"), exports);
|
|
37
|
-
__exportStar(require("./full-date/full-date-shape"), exports);
|
|
38
|
-
__exportStar(require("./full-date/is-valid-full-date"), exports);
|
|
39
|
-
__exportStar(require("./full-date/luxon-date-time-conversion"), exports);
|
|
40
|
-
__exportStar(require("./full-date/parsing"), exports);
|
|
41
|
-
__exportStar(require("./locales"), exports);
|
|
42
|
-
__exportStar(require("./timezone/timezone-checks"), exports);
|
|
43
|
-
__exportStar(require("./timezone/timezone-names"), exports);
|
|
44
|
-
__exportStar(require("./timezone/timezones"), exports);
|
package/dist/cjs/locales.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isValidTimezone = exports.assertValidTimezone = void 0;
|
|
4
|
-
const luxon_1 = require("luxon");
|
|
5
|
-
/**
|
|
6
|
-
* Asserts that the given timezoneName is a valid timezone name.
|
|
7
|
-
*
|
|
8
|
-
* Note that this may actually allow names beyond what is currently in the exact TimezoneName type,
|
|
9
|
-
* because this function uses luxon to check that it is able to generate a date with the given
|
|
10
|
-
* timezone, regardless of whether it's in our typed list or not.
|
|
11
|
-
*/
|
|
12
|
-
function assertValidTimezone(potentialTimezoneName) {
|
|
13
|
-
if (!luxon_1.Info.isValidIANAZone(potentialTimezoneName)) {
|
|
14
|
-
throw new Error(`'${potentialTimezoneName}' is not a valid time zone`);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.assertValidTimezone = assertValidTimezone;
|
|
18
|
-
/**
|
|
19
|
-
* Checks that the given timezoneName is a valid timezone name.
|
|
20
|
-
*
|
|
21
|
-
* Note that this may actually allow names beyond what is currently in the exact TimezoneName type,
|
|
22
|
-
* because this function uses luxon to check that it is able to generate a date with the given
|
|
23
|
-
* timezone, regardless of whether it's in our typed list or not.
|
|
24
|
-
*/
|
|
25
|
-
function isValidTimezone(potentialTimezoneName) {
|
|
26
|
-
try {
|
|
27
|
-
assertValidTimezone(potentialTimezoneName);
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.isValidTimezone = isValidTimezone;
|
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allTimezoneNames = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* This list was generated from Firefox 106.0.2 (which gave me the longest list out of all the
|
|
6
|
-
* browsers I had immediately available to me at the time) with the following code:
|
|
7
|
-
*
|
|
8
|
-
* Intl.supportedValuesOf('timeZone').map(zone => `'${zone}'`).join(',')
|
|
9
|
-
*/
|
|
10
|
-
exports.allTimezoneNames = [
|
|
11
|
-
'Africa/Abidjan',
|
|
12
|
-
'Africa/Accra',
|
|
13
|
-
'Africa/Addis_Ababa',
|
|
14
|
-
'Africa/Algiers',
|
|
15
|
-
'Africa/Asmara',
|
|
16
|
-
'Africa/Bamako',
|
|
17
|
-
'Africa/Bangui',
|
|
18
|
-
'Africa/Banjul',
|
|
19
|
-
'Africa/Bissau',
|
|
20
|
-
'Africa/Blantyre',
|
|
21
|
-
'Africa/Brazzaville',
|
|
22
|
-
'Africa/Bujumbura',
|
|
23
|
-
'Africa/Cairo',
|
|
24
|
-
'Africa/Casablanca',
|
|
25
|
-
'Africa/Ceuta',
|
|
26
|
-
'Africa/Conakry',
|
|
27
|
-
'Africa/Dakar',
|
|
28
|
-
'Africa/Dar_es_Salaam',
|
|
29
|
-
'Africa/Djibouti',
|
|
30
|
-
'Africa/Douala',
|
|
31
|
-
'Africa/El_Aaiun',
|
|
32
|
-
'Africa/Freetown',
|
|
33
|
-
'Africa/Gaborone',
|
|
34
|
-
'Africa/Harare',
|
|
35
|
-
'Africa/Johannesburg',
|
|
36
|
-
'Africa/Juba',
|
|
37
|
-
'Africa/Kampala',
|
|
38
|
-
'Africa/Khartoum',
|
|
39
|
-
'Africa/Kigali',
|
|
40
|
-
'Africa/Kinshasa',
|
|
41
|
-
'Africa/Lagos',
|
|
42
|
-
'Africa/Libreville',
|
|
43
|
-
'Africa/Lome',
|
|
44
|
-
'Africa/Luanda',
|
|
45
|
-
'Africa/Lubumbashi',
|
|
46
|
-
'Africa/Lusaka',
|
|
47
|
-
'Africa/Malabo',
|
|
48
|
-
'Africa/Maputo',
|
|
49
|
-
'Africa/Maseru',
|
|
50
|
-
'Africa/Mbabane',
|
|
51
|
-
'Africa/Mogadishu',
|
|
52
|
-
'Africa/Monrovia',
|
|
53
|
-
'Africa/Nairobi',
|
|
54
|
-
'Africa/Ndjamena',
|
|
55
|
-
'Africa/Niamey',
|
|
56
|
-
'Africa/Nouakchott',
|
|
57
|
-
'Africa/Ouagadougou',
|
|
58
|
-
'Africa/Porto-Novo',
|
|
59
|
-
'Africa/Sao_Tome',
|
|
60
|
-
'Africa/Timbuktu',
|
|
61
|
-
'Africa/Tripoli',
|
|
62
|
-
'Africa/Tunis',
|
|
63
|
-
'Africa/Windhoek',
|
|
64
|
-
'America/Adak',
|
|
65
|
-
'America/Anchorage',
|
|
66
|
-
'America/Anguilla',
|
|
67
|
-
'America/Antigua',
|
|
68
|
-
'America/Araguaina',
|
|
69
|
-
'America/Argentina/Buenos_Aires',
|
|
70
|
-
'America/Argentina/Catamarca',
|
|
71
|
-
'America/Argentina/ComodRivadavia',
|
|
72
|
-
'America/Argentina/Cordoba',
|
|
73
|
-
'America/Argentina/Jujuy',
|
|
74
|
-
'America/Argentina/La_Rioja',
|
|
75
|
-
'America/Argentina/Mendoza',
|
|
76
|
-
'America/Argentina/Rio_Gallegos',
|
|
77
|
-
'America/Argentina/Salta',
|
|
78
|
-
'America/Argentina/San_Juan',
|
|
79
|
-
'America/Argentina/San_Luis',
|
|
80
|
-
'America/Argentina/Tucuman',
|
|
81
|
-
'America/Argentina/Ushuaia',
|
|
82
|
-
'America/Aruba',
|
|
83
|
-
'America/Asuncion',
|
|
84
|
-
'America/Atikokan',
|
|
85
|
-
'America/Bahia',
|
|
86
|
-
'America/Bahia_Banderas',
|
|
87
|
-
'America/Barbados',
|
|
88
|
-
'America/Belem',
|
|
89
|
-
'America/Belize',
|
|
90
|
-
'America/Blanc-Sablon',
|
|
91
|
-
'America/Boa_Vista',
|
|
92
|
-
'America/Bogota',
|
|
93
|
-
'America/Boise',
|
|
94
|
-
'America/Cambridge_Bay',
|
|
95
|
-
'America/Campo_Grande',
|
|
96
|
-
'America/Cancun',
|
|
97
|
-
'America/Caracas',
|
|
98
|
-
'America/Cayenne',
|
|
99
|
-
'America/Cayman',
|
|
100
|
-
'America/Chicago',
|
|
101
|
-
'America/Chihuahua',
|
|
102
|
-
'America/Coral_Harbour',
|
|
103
|
-
'America/Costa_Rica',
|
|
104
|
-
'America/Creston',
|
|
105
|
-
'America/Cuiaba',
|
|
106
|
-
'America/Curacao',
|
|
107
|
-
'America/Danmarkshavn',
|
|
108
|
-
'America/Dawson',
|
|
109
|
-
'America/Dawson_Creek',
|
|
110
|
-
'America/Denver',
|
|
111
|
-
'America/Detroit',
|
|
112
|
-
'America/Dominica',
|
|
113
|
-
'America/Edmonton',
|
|
114
|
-
'America/Eirunepe',
|
|
115
|
-
'America/El_Salvador',
|
|
116
|
-
'America/Ensenada',
|
|
117
|
-
'America/Fort_Nelson',
|
|
118
|
-
'America/Fortaleza',
|
|
119
|
-
'America/Glace_Bay',
|
|
120
|
-
'America/Goose_Bay',
|
|
121
|
-
'America/Grand_Turk',
|
|
122
|
-
'America/Grenada',
|
|
123
|
-
'America/Guadeloupe',
|
|
124
|
-
'America/Guatemala',
|
|
125
|
-
'America/Guayaquil',
|
|
126
|
-
'America/Guyana',
|
|
127
|
-
'America/Halifax',
|
|
128
|
-
'America/Havana',
|
|
129
|
-
'America/Hermosillo',
|
|
130
|
-
'America/Indiana/Indianapolis',
|
|
131
|
-
'America/Indiana/Knox',
|
|
132
|
-
'America/Indiana/Marengo',
|
|
133
|
-
'America/Indiana/Petersburg',
|
|
134
|
-
'America/Indiana/Tell_City',
|
|
135
|
-
'America/Indiana/Vevay',
|
|
136
|
-
'America/Indiana/Vincennes',
|
|
137
|
-
'America/Indiana/Winamac',
|
|
138
|
-
'America/Inuvik',
|
|
139
|
-
'America/Iqaluit',
|
|
140
|
-
'America/Jamaica',
|
|
141
|
-
'America/Juneau',
|
|
142
|
-
'America/Kentucky/Louisville',
|
|
143
|
-
'America/Kentucky/Monticello',
|
|
144
|
-
'America/La_Paz',
|
|
145
|
-
'America/Lima',
|
|
146
|
-
'America/Los_Angeles',
|
|
147
|
-
'America/Maceio',
|
|
148
|
-
'America/Managua',
|
|
149
|
-
'America/Manaus',
|
|
150
|
-
'America/Martinique',
|
|
151
|
-
'America/Matamoros',
|
|
152
|
-
'America/Mazatlan',
|
|
153
|
-
'America/Menominee',
|
|
154
|
-
'America/Merida',
|
|
155
|
-
'America/Metlakatla',
|
|
156
|
-
'America/Mexico_City',
|
|
157
|
-
'America/Miquelon',
|
|
158
|
-
'America/Moncton',
|
|
159
|
-
'America/Monterrey',
|
|
160
|
-
'America/Montevideo',
|
|
161
|
-
'America/Montreal',
|
|
162
|
-
'America/Montserrat',
|
|
163
|
-
'America/Nassau',
|
|
164
|
-
'America/New_York',
|
|
165
|
-
'America/Nipigon',
|
|
166
|
-
'America/Nome',
|
|
167
|
-
'America/Noronha',
|
|
168
|
-
'America/North_Dakota/Beulah',
|
|
169
|
-
'America/North_Dakota/Center',
|
|
170
|
-
'America/North_Dakota/New_Salem',
|
|
171
|
-
'America/Nuuk',
|
|
172
|
-
'America/Ojinaga',
|
|
173
|
-
'America/Panama',
|
|
174
|
-
'America/Pangnirtung',
|
|
175
|
-
'America/Paramaribo',
|
|
176
|
-
'America/Phoenix',
|
|
177
|
-
'America/Port-au-Prince',
|
|
178
|
-
'America/Port_of_Spain',
|
|
179
|
-
'America/Porto_Velho',
|
|
180
|
-
'America/Puerto_Rico',
|
|
181
|
-
'America/Punta_Arenas',
|
|
182
|
-
'America/Rainy_River',
|
|
183
|
-
'America/Rankin_Inlet',
|
|
184
|
-
'America/Recife',
|
|
185
|
-
'America/Regina',
|
|
186
|
-
'America/Resolute',
|
|
187
|
-
'America/Rio_Branco',
|
|
188
|
-
'America/Rosario',
|
|
189
|
-
'America/Santarem',
|
|
190
|
-
'America/Santiago',
|
|
191
|
-
'America/Santo_Domingo',
|
|
192
|
-
'America/Sao_Paulo',
|
|
193
|
-
'America/Scoresbysund',
|
|
194
|
-
'America/Sitka',
|
|
195
|
-
'America/St_Johns',
|
|
196
|
-
'America/St_Kitts',
|
|
197
|
-
'America/St_Lucia',
|
|
198
|
-
'America/St_Thomas',
|
|
199
|
-
'America/St_Vincent',
|
|
200
|
-
'America/Swift_Current',
|
|
201
|
-
'America/Tegucigalpa',
|
|
202
|
-
'America/Thule',
|
|
203
|
-
'America/Thunder_Bay',
|
|
204
|
-
'America/Tijuana',
|
|
205
|
-
'America/Toronto',
|
|
206
|
-
'America/Tortola',
|
|
207
|
-
'America/Vancouver',
|
|
208
|
-
'America/Whitehorse',
|
|
209
|
-
'America/Winnipeg',
|
|
210
|
-
'America/Yakutat',
|
|
211
|
-
'America/Yellowknife',
|
|
212
|
-
'Antarctica/Casey',
|
|
213
|
-
'Antarctica/Davis',
|
|
214
|
-
'Antarctica/DumontDUrville',
|
|
215
|
-
'Antarctica/Macquarie',
|
|
216
|
-
'Antarctica/Mawson',
|
|
217
|
-
'Antarctica/McMurdo',
|
|
218
|
-
'Antarctica/Palmer',
|
|
219
|
-
'Antarctica/Rothera',
|
|
220
|
-
'Antarctica/Syowa',
|
|
221
|
-
'Antarctica/Troll',
|
|
222
|
-
'Antarctica/Vostok',
|
|
223
|
-
'Asia/Aden',
|
|
224
|
-
'Asia/Almaty',
|
|
225
|
-
'Asia/Amman',
|
|
226
|
-
'Asia/Anadyr',
|
|
227
|
-
'Asia/Aqtau',
|
|
228
|
-
'Asia/Aqtobe',
|
|
229
|
-
'Asia/Ashgabat',
|
|
230
|
-
'Asia/Atyrau',
|
|
231
|
-
'Asia/Baghdad',
|
|
232
|
-
'Asia/Bahrain',
|
|
233
|
-
'Asia/Baku',
|
|
234
|
-
'Asia/Bangkok',
|
|
235
|
-
'Asia/Barnaul',
|
|
236
|
-
'Asia/Beirut',
|
|
237
|
-
'Asia/Bishkek',
|
|
238
|
-
'Asia/Brunei',
|
|
239
|
-
'Asia/Chita',
|
|
240
|
-
'Asia/Choibalsan',
|
|
241
|
-
'Asia/Chongqing',
|
|
242
|
-
'Asia/Colombo',
|
|
243
|
-
'Asia/Damascus',
|
|
244
|
-
'Asia/Dhaka',
|
|
245
|
-
'Asia/Dili',
|
|
246
|
-
'Asia/Dubai',
|
|
247
|
-
'Asia/Dushanbe',
|
|
248
|
-
'Asia/Famagusta',
|
|
249
|
-
'Asia/Gaza',
|
|
250
|
-
'Asia/Harbin',
|
|
251
|
-
'Asia/Hebron',
|
|
252
|
-
'Asia/Ho_Chi_Minh',
|
|
253
|
-
'Asia/Hong_Kong',
|
|
254
|
-
'Asia/Hovd',
|
|
255
|
-
'Asia/Irkutsk',
|
|
256
|
-
'Asia/Jakarta',
|
|
257
|
-
'Asia/Jayapura',
|
|
258
|
-
'Asia/Jerusalem',
|
|
259
|
-
'Asia/Kabul',
|
|
260
|
-
'Asia/Kamchatka',
|
|
261
|
-
'Asia/Karachi',
|
|
262
|
-
'Asia/Kashgar',
|
|
263
|
-
'Asia/Kathmandu',
|
|
264
|
-
'Asia/Khandyga',
|
|
265
|
-
'Asia/Kolkata',
|
|
266
|
-
'Asia/Krasnoyarsk',
|
|
267
|
-
'Asia/Kuala_Lumpur',
|
|
268
|
-
'Asia/Kuching',
|
|
269
|
-
'Asia/Kuwait',
|
|
270
|
-
'Asia/Macau',
|
|
271
|
-
'Asia/Magadan',
|
|
272
|
-
'Asia/Makassar',
|
|
273
|
-
'Asia/Manila',
|
|
274
|
-
'Asia/Muscat',
|
|
275
|
-
'Asia/Nicosia',
|
|
276
|
-
'Asia/Novokuznetsk',
|
|
277
|
-
'Asia/Novosibirsk',
|
|
278
|
-
'Asia/Omsk',
|
|
279
|
-
'Asia/Oral',
|
|
280
|
-
'Asia/Phnom_Penh',
|
|
281
|
-
'Asia/Pontianak',
|
|
282
|
-
'Asia/Pyongyang',
|
|
283
|
-
'Asia/Qatar',
|
|
284
|
-
'Asia/Qostanay',
|
|
285
|
-
'Asia/Qyzylorda',
|
|
286
|
-
'Asia/Riyadh',
|
|
287
|
-
'Asia/Sakhalin',
|
|
288
|
-
'Asia/Samarkand',
|
|
289
|
-
'Asia/Seoul',
|
|
290
|
-
'Asia/Shanghai',
|
|
291
|
-
'Asia/Singapore',
|
|
292
|
-
'Asia/Srednekolymsk',
|
|
293
|
-
'Asia/Taipei',
|
|
294
|
-
'Asia/Tashkent',
|
|
295
|
-
'Asia/Tbilisi',
|
|
296
|
-
'Asia/Tehran',
|
|
297
|
-
'Asia/Tel_Aviv',
|
|
298
|
-
'Asia/Thimphu',
|
|
299
|
-
'Asia/Tokyo',
|
|
300
|
-
'Asia/Tomsk',
|
|
301
|
-
'Asia/Ulaanbaatar',
|
|
302
|
-
'Asia/Urumqi',
|
|
303
|
-
'Asia/Ust-Nera',
|
|
304
|
-
'Asia/Vientiane',
|
|
305
|
-
'Asia/Vladivostok',
|
|
306
|
-
'Asia/Yakutsk',
|
|
307
|
-
'Asia/Yangon',
|
|
308
|
-
'Asia/Yekaterinburg',
|
|
309
|
-
'Asia/Yerevan',
|
|
310
|
-
'Atlantic/Azores',
|
|
311
|
-
'Atlantic/Bermuda',
|
|
312
|
-
'Atlantic/Canary',
|
|
313
|
-
'Atlantic/Cape_Verde',
|
|
314
|
-
'Atlantic/Faroe',
|
|
315
|
-
'Atlantic/Jan_Mayen',
|
|
316
|
-
'Atlantic/Madeira',
|
|
317
|
-
'Atlantic/Reykjavik',
|
|
318
|
-
'Atlantic/South_Georgia',
|
|
319
|
-
'Atlantic/St_Helena',
|
|
320
|
-
'Atlantic/Stanley',
|
|
321
|
-
'Australia/Adelaide',
|
|
322
|
-
'Australia/Brisbane',
|
|
323
|
-
'Australia/Broken_Hill',
|
|
324
|
-
'Australia/Currie',
|
|
325
|
-
'Australia/Darwin',
|
|
326
|
-
'Australia/Eucla',
|
|
327
|
-
'Australia/Hobart',
|
|
328
|
-
'Australia/Lindeman',
|
|
329
|
-
'Australia/Lord_Howe',
|
|
330
|
-
'Australia/Melbourne',
|
|
331
|
-
'Australia/Perth',
|
|
332
|
-
'Australia/Sydney',
|
|
333
|
-
'CET',
|
|
334
|
-
'CST6CDT',
|
|
335
|
-
'EET',
|
|
336
|
-
'EST',
|
|
337
|
-
'EST5EDT',
|
|
338
|
-
'Etc/GMT+1',
|
|
339
|
-
'Etc/GMT+10',
|
|
340
|
-
'Etc/GMT+11',
|
|
341
|
-
'Etc/GMT+12',
|
|
342
|
-
'Etc/GMT+2',
|
|
343
|
-
'Etc/GMT+3',
|
|
344
|
-
'Etc/GMT+4',
|
|
345
|
-
'Etc/GMT+5',
|
|
346
|
-
'Etc/GMT+6',
|
|
347
|
-
'Etc/GMT+7',
|
|
348
|
-
'Etc/GMT+8',
|
|
349
|
-
'Etc/GMT+9',
|
|
350
|
-
'Etc/GMT-1',
|
|
351
|
-
'Etc/GMT-10',
|
|
352
|
-
'Etc/GMT-11',
|
|
353
|
-
'Etc/GMT-12',
|
|
354
|
-
'Etc/GMT-13',
|
|
355
|
-
'Etc/GMT-14',
|
|
356
|
-
'Etc/GMT-2',
|
|
357
|
-
'Etc/GMT-3',
|
|
358
|
-
'Etc/GMT-4',
|
|
359
|
-
'Etc/GMT-5',
|
|
360
|
-
'Etc/GMT-6',
|
|
361
|
-
'Etc/GMT-7',
|
|
362
|
-
'Etc/GMT-8',
|
|
363
|
-
'Etc/GMT-9',
|
|
364
|
-
'Europe/Amsterdam',
|
|
365
|
-
'Europe/Andorra',
|
|
366
|
-
'Europe/Astrakhan',
|
|
367
|
-
'Europe/Athens',
|
|
368
|
-
'Europe/Belfast',
|
|
369
|
-
'Europe/Belgrade',
|
|
370
|
-
'Europe/Berlin',
|
|
371
|
-
'Europe/Brussels',
|
|
372
|
-
'Europe/Bucharest',
|
|
373
|
-
'Europe/Budapest',
|
|
374
|
-
'Europe/Chisinau',
|
|
375
|
-
'Europe/Copenhagen',
|
|
376
|
-
'Europe/Dublin',
|
|
377
|
-
'Europe/Gibraltar',
|
|
378
|
-
'Europe/Guernsey',
|
|
379
|
-
'Europe/Helsinki',
|
|
380
|
-
'Europe/Isle_of_Man',
|
|
381
|
-
'Europe/Istanbul',
|
|
382
|
-
'Europe/Jersey',
|
|
383
|
-
'Europe/Kaliningrad',
|
|
384
|
-
'Europe/Kirov',
|
|
385
|
-
'Europe/Kyiv',
|
|
386
|
-
'Europe/Lisbon',
|
|
387
|
-
'Europe/Ljubljana',
|
|
388
|
-
'Europe/London',
|
|
389
|
-
'Europe/Luxembourg',
|
|
390
|
-
'Europe/Madrid',
|
|
391
|
-
'Europe/Malta',
|
|
392
|
-
'Europe/Minsk',
|
|
393
|
-
'Europe/Monaco',
|
|
394
|
-
'Europe/Moscow',
|
|
395
|
-
'Europe/Oslo',
|
|
396
|
-
'Europe/Paris',
|
|
397
|
-
'Europe/Prague',
|
|
398
|
-
'Europe/Riga',
|
|
399
|
-
'Europe/Rome',
|
|
400
|
-
'Europe/Samara',
|
|
401
|
-
'Europe/Sarajevo',
|
|
402
|
-
'Europe/Saratov',
|
|
403
|
-
'Europe/Simferopol',
|
|
404
|
-
'Europe/Skopje',
|
|
405
|
-
'Europe/Sofia',
|
|
406
|
-
'Europe/Stockholm',
|
|
407
|
-
'Europe/Tallinn',
|
|
408
|
-
'Europe/Tirane',
|
|
409
|
-
'Europe/Tiraspol',
|
|
410
|
-
'Europe/Ulyanovsk',
|
|
411
|
-
'Europe/Uzhgorod',
|
|
412
|
-
'Europe/Vaduz',
|
|
413
|
-
'Europe/Vienna',
|
|
414
|
-
'Europe/Vilnius',
|
|
415
|
-
'Europe/Volgograd',
|
|
416
|
-
'Europe/Warsaw',
|
|
417
|
-
'Europe/Zagreb',
|
|
418
|
-
'Europe/Zaporozhye',
|
|
419
|
-
'Europe/Zurich',
|
|
420
|
-
'Factory',
|
|
421
|
-
'HST',
|
|
422
|
-
'Indian/Antananarivo',
|
|
423
|
-
'Indian/Chagos',
|
|
424
|
-
'Indian/Christmas',
|
|
425
|
-
'Indian/Cocos',
|
|
426
|
-
'Indian/Comoro',
|
|
427
|
-
'Indian/Kerguelen',
|
|
428
|
-
'Indian/Mahe',
|
|
429
|
-
'Indian/Maldives',
|
|
430
|
-
'Indian/Mauritius',
|
|
431
|
-
'Indian/Mayotte',
|
|
432
|
-
'Indian/Reunion',
|
|
433
|
-
'MET',
|
|
434
|
-
'MST',
|
|
435
|
-
'MST7MDT',
|
|
436
|
-
'PST8PDT',
|
|
437
|
-
'Pacific/Apia',
|
|
438
|
-
'Pacific/Auckland',
|
|
439
|
-
'Pacific/Bougainville',
|
|
440
|
-
'Pacific/Chatham',
|
|
441
|
-
'Pacific/Chuuk',
|
|
442
|
-
'Pacific/Easter',
|
|
443
|
-
'Pacific/Efate',
|
|
444
|
-
'Pacific/Enderbury',
|
|
445
|
-
'Pacific/Fakaofo',
|
|
446
|
-
'Pacific/Fiji',
|
|
447
|
-
'Pacific/Funafuti',
|
|
448
|
-
'Pacific/Galapagos',
|
|
449
|
-
'Pacific/Gambier',
|
|
450
|
-
'Pacific/Guadalcanal',
|
|
451
|
-
'Pacific/Guam',
|
|
452
|
-
'Pacific/Honolulu',
|
|
453
|
-
'Pacific/Johnston',
|
|
454
|
-
'Pacific/Kanton',
|
|
455
|
-
'Pacific/Kiritimati',
|
|
456
|
-
'Pacific/Kosrae',
|
|
457
|
-
'Pacific/Kwajalein',
|
|
458
|
-
'Pacific/Majuro',
|
|
459
|
-
'Pacific/Marquesas',
|
|
460
|
-
'Pacific/Midway',
|
|
461
|
-
'Pacific/Nauru',
|
|
462
|
-
'Pacific/Niue',
|
|
463
|
-
'Pacific/Norfolk',
|
|
464
|
-
'Pacific/Noumea',
|
|
465
|
-
'Pacific/Pago_Pago',
|
|
466
|
-
'Pacific/Palau',
|
|
467
|
-
'Pacific/Pitcairn',
|
|
468
|
-
'Pacific/Pohnpei',
|
|
469
|
-
'Pacific/Port_Moresby',
|
|
470
|
-
'Pacific/Rarotonga',
|
|
471
|
-
'Pacific/Saipan',
|
|
472
|
-
'Pacific/Tahiti',
|
|
473
|
-
'Pacific/Tarawa',
|
|
474
|
-
'Pacific/Tongatapu',
|
|
475
|
-
'Pacific/Wake',
|
|
476
|
-
'Pacific/Wallis',
|
|
477
|
-
'UTC',
|
|
478
|
-
'WET',
|
|
479
|
-
];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.utcTimezone = exports.userTimezone = exports.timezones = void 0;
|
|
4
|
-
const luxon_1 = require("luxon");
|
|
5
|
-
const timezone_names_1 = require("./timezone-names");
|
|
6
|
-
/** A typed object of all known timezones, as of the writing of this message. */
|
|
7
|
-
exports.timezones = timezone_names_1.allTimezoneNames.reduce((accum, timezoneName) => {
|
|
8
|
-
accum[timezoneName] = timezoneName;
|
|
9
|
-
return accum;
|
|
10
|
-
}, {});
|
|
11
|
-
/** The timezone of the current user's environment. */
|
|
12
|
-
exports.userTimezone = luxon_1.Settings.defaultZone.name;
|
|
13
|
-
/** The UTC timezone. */
|
|
14
|
-
exports.utcTimezone = exports.timezones.UTC;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AnyDuration } from '../duration/duration';
|
|
2
|
-
import { FullDate } from '../full-date/full-date-shape';
|
|
3
|
-
import { Timezone } from '../timezone/timezone-names';
|
|
4
|
-
/**
|
|
5
|
-
* Calculates a new date starting at the given fullDate and adding the given offsets. Offsets can be
|
|
6
|
-
* negative to go backwards in time.
|
|
7
|
-
*/
|
|
8
|
-
export declare function calculateRelativeDate<const SpecificTimezone extends Timezone>(fullDate: Readonly<FullDate<SpecificTimezone>>, offset: Readonly<AnyDuration>): FullDate<SpecificTimezone>;
|