chronos-date 1.1.0 → 1.1.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/dist/{basic-Dputob9z.mjs → basic-DqKyujoj.mjs} +16 -0
- package/dist/{basic-DIp_pxR2.cjs → basic-DsQqC5nZ.cjs} +16 -0
- package/dist/constants.cjs +19 -3
- package/dist/constants.d.cts +17 -1
- package/dist/constants.d.mts +17 -1
- package/dist/constants.mjs +19 -3
- package/dist/{convert-dQuGWhVm.cjs → convert-DbgntRVW.cjs} +17 -1
- package/dist/{convert-CNVL-mop.mjs → convert-mMaI4YP0.mjs} +17 -1
- package/dist/{greet-B9j4afzD.mjs → greet-D07t2_e6.mjs} +17 -1
- package/dist/{greet-B8ZtypgG.cjs → greet-hjVsd2dt.cjs} +17 -1
- package/dist/guards.cjs +32 -11
- package/dist/guards.d.cts +18 -2
- package/dist/guards.d.mts +18 -2
- package/dist/guards.mjs +32 -11
- package/dist/{helpers-M_SfAbAv.cjs → helpers-CQzi908i.cjs} +20 -4
- package/dist/{helpers-CrMc9iJZ.mjs → helpers-DEf4sevD.mjs} +20 -4
- package/dist/index.cjs +29 -13
- package/dist/index.d.cts +18 -2
- package/dist/index.d.mts +18 -2
- package/dist/index.mjs +30 -14
- package/dist/{non-primitives-CT4vszrX.cjs → non-primitives-D9zxCwX8.cjs} +16 -0
- package/dist/{non-primitives-DrQfPj1r.mjs → non-primitives-DBtomDty.mjs} +16 -0
- package/dist/plugins/banglaPlugin.cjs +21 -5
- package/dist/plugins/banglaPlugin.d.cts +19 -3
- package/dist/plugins/banglaPlugin.d.mts +19 -3
- package/dist/plugins/banglaPlugin.mjs +21 -5
- package/dist/plugins/businessPlugin.cjs +19 -3
- package/dist/plugins/businessPlugin.d.cts +17 -1
- package/dist/plugins/businessPlugin.d.mts +17 -1
- package/dist/plugins/businessPlugin.mjs +19 -3
- package/dist/plugins/dateRangePlugin.cjs +19 -3
- package/dist/plugins/dateRangePlugin.d.cts +19 -3
- package/dist/plugins/dateRangePlugin.d.mts +19 -3
- package/dist/plugins/dateRangePlugin.mjs +19 -3
- package/dist/plugins/dayPartPlugin.cjs +18 -2
- package/dist/plugins/dayPartPlugin.d.cts +17 -1
- package/dist/plugins/dayPartPlugin.d.mts +17 -1
- package/dist/plugins/dayPartPlugin.mjs +18 -2
- package/dist/plugins/durationPlugin.cjs +17 -1
- package/dist/plugins/durationPlugin.d.cts +17 -1
- package/dist/plugins/durationPlugin.d.mts +17 -1
- package/dist/plugins/durationPlugin.mjs +17 -1
- package/dist/plugins/fromNowPlugin.cjs +18 -2
- package/dist/plugins/fromNowPlugin.d.cts +17 -1
- package/dist/plugins/fromNowPlugin.d.mts +17 -1
- package/dist/plugins/fromNowPlugin.mjs +18 -2
- package/dist/plugins/greetingPlugin.cjs +17 -1
- package/dist/plugins/greetingPlugin.d.cts +17 -1
- package/dist/plugins/greetingPlugin.d.mts +17 -1
- package/dist/plugins/greetingPlugin.mjs +17 -1
- package/dist/plugins/palindromePlugin.cjs +17 -1
- package/dist/plugins/palindromePlugin.d.cts +17 -1
- package/dist/plugins/palindromePlugin.d.mts +17 -1
- package/dist/plugins/palindromePlugin.mjs +17 -1
- package/dist/plugins/relativeTimePlugin.cjs +17 -1
- package/dist/plugins/relativeTimePlugin.d.cts +17 -1
- package/dist/plugins/relativeTimePlugin.d.mts +17 -1
- package/dist/plugins/relativeTimePlugin.mjs +17 -1
- package/dist/plugins/roundPlugin.cjs +18 -2
- package/dist/plugins/roundPlugin.d.cts +17 -1
- package/dist/plugins/roundPlugin.d.mts +17 -1
- package/dist/plugins/roundPlugin.mjs +18 -2
- package/dist/plugins/seasonPlugin.cjs +17 -1
- package/dist/plugins/seasonPlugin.d.cts +17 -1
- package/dist/plugins/seasonPlugin.d.mts +17 -1
- package/dist/plugins/seasonPlugin.mjs +17 -1
- package/dist/plugins/timeZonePlugin.cjs +20 -4
- package/dist/plugins/timeZonePlugin.d.cts +17 -1
- package/dist/plugins/timeZonePlugin.d.mts +17 -1
- package/dist/plugins/timeZonePlugin.mjs +20 -4
- package/dist/plugins/zodiacPlugin.cjs +18 -2
- package/dist/plugins/zodiacPlugin.d.cts +17 -1
- package/dist/plugins/zodiacPlugin.d.mts +17 -1
- package/dist/plugins/zodiacPlugin.mjs +18 -2
- package/dist/{primitives-BME3_QrA.cjs → primitives-CtuSNmV7.cjs} +16 -0
- package/dist/primitives-dXzXlzJw.mjs +35 -0
- package/dist/{seasons-CcZicoe1.cjs → seasons-B7kK88zq.cjs} +16 -0
- package/dist/{seasons-CioTH5Dm.d.mts → seasons-B_kjFWIX.d.mts} +16 -0
- package/dist/{seasons-CsVeJ27s.d.cts → seasons-CpUn45n6.d.cts} +16 -0
- package/dist/{seasons-CHnjrIKK.mjs → seasons-Cq3ah3pV.mjs} +16 -0
- package/dist/{timezone-DYVJJYKz.cjs → timezone-BNnHFgki.cjs} +16 -0
- package/dist/{timezone-BfBXeMK_.mjs → timezone-Db2CeL32.mjs} +16 -0
- package/dist/{types-B2fgrJ86.d.mts → types-Cb4gxrgJ.d.mts} +29 -15
- package/dist/{types-DPTQ_yLx.d.cts → types-CdmsXbU_.d.cts} +29 -15
- package/dist/types.cjs +16 -0
- package/dist/types.d.cts +18 -2
- package/dist/types.d.mts +18 -2
- package/dist/types.mjs +16 -0
- package/dist/{utilities-CtOZhIYv.mjs → utilities-BGX8dviZ.mjs} +21 -5
- package/dist/{utilities-BU4MSYS7.mjs → utilities-BKtVo78T.mjs} +17 -1
- package/dist/{utilities-CGL7F6R9.cjs → utilities-CpF3uys3.cjs} +17 -1
- package/dist/{utilities-bXwTPJaD.cjs → utilities-D47SN9EZ.cjs} +21 -5
- package/dist/utils.cjs +21 -5
- package/dist/utils.d.cts +20 -4
- package/dist/utils.d.mts +20 -4
- package/dist/utils.mjs +21 -5
- package/package.json +10 -4
- package/dist/primitives-DEt6I7Sy.mjs +0 -19
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
//#region src/constants/basic.ts
|
|
2
18
|
/** @internal Symbol for accessing Chronos internals (plugin author use only) */
|
|
3
19
|
const INTERNALS = Symbol("Internals");
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
|
|
2
18
|
//#region src/constants/basic.ts
|
|
3
19
|
/** @internal Symbol for accessing Chronos internals (plugin author use only) */
|
package/dist/constants.cjs
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_basic = require('./basic-
|
|
3
|
-
const require_timezone = require('./timezone-
|
|
4
|
-
const require_seasons = require('./seasons-
|
|
18
|
+
const require_basic = require('./basic-DsQqC5nZ.cjs');
|
|
19
|
+
const require_timezone = require('./timezone-BNnHFgki.cjs');
|
|
20
|
+
const require_seasons = require('./seasons-B7kK88zq.cjs');
|
|
5
21
|
|
|
6
22
|
exports.AUSTRALIA_SEASONS = require_seasons.AUSTRALIA_SEASONS;
|
|
7
23
|
exports.BANGLADESH_SEASONS = require_seasons.BANGLADESH_SEASONS;
|
package/dist/constants.d.cts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { L as VEDIC_ZODIAC_SIGNS, M as MONTHS, R as WESTERN_ZODIAC_SIGNS, _ as TIME_ZONE_LABELS, a as INDIA_IMD_SEASONS, c as JAPAN_SEASONS, d as US_ACADEMIC_SEASONS, f as IANA_TZ_IDS, g as TIME_ZONE_IDS, h as TIME_ZONES_NATIVE, i as ETHIOPIA_SEASONS, l as PHILIPPINES_SEASONS, m as TIME_ZONES, n as BANGLADESH_SEASONS, o as INDIA_TAMIL_SEASONS, p as NATIVE_TZ_IDS, r as DEFAULT_SEASONS, s as INDIA_VEDIC_SEASONS, t as AUSTRALIA_SEASONS, u as SEASON_PRESETS, w as DAYS } from "./seasons-CpUn45n6.cjs";
|
|
2
18
|
export { AUSTRALIA_SEASONS, BANGLADESH_SEASONS, ETHIOPIA_SEASONS, IANA_TZ_IDS, INDIA_IMD_SEASONS, INDIA_TAMIL_SEASONS, INDIA_VEDIC_SEASONS, JAPAN_SEASONS, MONTHS, NATIVE_TZ_IDS, PHILIPPINES_SEASONS, SEASON_PRESETS, TIME_ZONES, TIME_ZONES as TZ_ABBREVIATIONS, TIME_ZONES_NATIVE, TIME_ZONE_IDS, TIME_ZONE_LABELS, US_ACADEMIC_SEASONS, VEDIC_ZODIAC_SIGNS, DAYS as WEEK_DAYS, DEFAULT_SEASONS as WESTERN_SEASONS, WESTERN_ZODIAC_SIGNS };
|
package/dist/constants.d.mts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { L as VEDIC_ZODIAC_SIGNS, M as MONTHS, R as WESTERN_ZODIAC_SIGNS, _ as TIME_ZONE_LABELS, a as INDIA_IMD_SEASONS, c as JAPAN_SEASONS, d as US_ACADEMIC_SEASONS, f as IANA_TZ_IDS, g as TIME_ZONE_IDS, h as TIME_ZONES_NATIVE, i as ETHIOPIA_SEASONS, l as PHILIPPINES_SEASONS, m as TIME_ZONES, n as BANGLADESH_SEASONS, o as INDIA_TAMIL_SEASONS, p as NATIVE_TZ_IDS, r as DEFAULT_SEASONS, s as INDIA_VEDIC_SEASONS, t as AUSTRALIA_SEASONS, u as SEASON_PRESETS, w as DAYS } from "./seasons-B_kjFWIX.mjs";
|
|
2
18
|
export { AUSTRALIA_SEASONS, BANGLADESH_SEASONS, ETHIOPIA_SEASONS, IANA_TZ_IDS, INDIA_IMD_SEASONS, INDIA_TAMIL_SEASONS, INDIA_VEDIC_SEASONS, JAPAN_SEASONS, MONTHS, NATIVE_TZ_IDS, PHILIPPINES_SEASONS, SEASON_PRESETS, TIME_ZONES, TIME_ZONES as TZ_ABBREVIATIONS, TIME_ZONES_NATIVE, TIME_ZONE_IDS, TIME_ZONE_LABELS, US_ACADEMIC_SEASONS, VEDIC_ZODIAC_SIGNS, DAYS as WEEK_DAYS, DEFAULT_SEASONS as WESTERN_SEASONS, WESTERN_ZODIAC_SIGNS };
|
package/dist/constants.mjs
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { c as MONTHS, f as VEDIC_ZODIAC_SIGNS, o as DAYS, p as WESTERN_ZODIAC_SIGNS } from "./basic-DqKyujoj.mjs";
|
|
18
|
+
import { a as TIME_ZONE_IDS, i as TIME_ZONES_NATIVE, n as NATIVE_TZ_IDS, o as TIME_ZONE_LABELS, r as TIME_ZONES, t as IANA_TZ_IDS } from "./timezone-Db2CeL32.mjs";
|
|
19
|
+
import { a as INDIA_IMD_SEASONS, c as JAPAN_SEASONS, d as US_ACADEMIC_SEASONS, i as ETHIOPIA_SEASONS, l as PHILIPPINES_SEASONS, n as BANGLADESH_SEASONS, o as INDIA_TAMIL_SEASONS, r as DEFAULT_SEASONS, s as INDIA_VEDIC_SEASONS, t as AUSTRALIA_SEASONS, u as SEASON_PRESETS } from "./seasons-Cq3ah3pV.mjs";
|
|
4
20
|
|
|
5
21
|
export { AUSTRALIA_SEASONS, BANGLADESH_SEASONS, ETHIOPIA_SEASONS, IANA_TZ_IDS, INDIA_IMD_SEASONS, INDIA_TAMIL_SEASONS, INDIA_VEDIC_SEASONS, JAPAN_SEASONS, MONTHS, NATIVE_TZ_IDS, PHILIPPINES_SEASONS, SEASON_PRESETS, TIME_ZONES, TIME_ZONES as TZ_ABBREVIATIONS, TIME_ZONES_NATIVE, TIME_ZONE_IDS, TIME_ZONE_LABELS, US_ACADEMIC_SEASONS, VEDIC_ZODIAC_SIGNS, DAYS as WEEK_DAYS, DEFAULT_SEASONS as WESTERN_SEASONS, WESTERN_ZODIAC_SIGNS };
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const require_primitives = require('./primitives-CtuSNmV7.cjs');
|
|
2
18
|
|
|
3
19
|
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/basics.js
|
|
4
20
|
function trimString(input) {
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { n as isNonEmptyString } from "./primitives-dXzXlzJw.mjs";
|
|
2
18
|
|
|
3
19
|
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/basics.js
|
|
4
20
|
function trimString(input) {
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import { isValidTime } from "./guards.mjs";
|
|
2
|
-
import { n as extractHourMinute, p as getTotalMinutes } from "./utilities-
|
|
18
|
+
import { n as extractHourMinute, p as getTotalMinutes } from "./utilities-BGX8dviZ.mjs";
|
|
3
19
|
|
|
4
20
|
//#region src/utils/greet.ts
|
|
5
21
|
/**
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
const require_guards = require('./guards.cjs');
|
|
2
|
-
const require_utilities = require('./utilities-
|
|
18
|
+
const require_utilities = require('./utilities-D47SN9EZ.cjs');
|
|
3
19
|
|
|
4
20
|
//#region src/utils/greet.ts
|
|
5
21
|
/**
|
package/dist/guards.cjs
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_timezone = require('./timezone-
|
|
3
|
-
const require_primitives = require('./primitives-
|
|
4
|
-
const require_non_primitives = require('./non-primitives-
|
|
5
|
-
const require_utilities = require('./utilities-
|
|
18
|
+
const require_timezone = require('./timezone-BNnHFgki.cjs');
|
|
19
|
+
const require_primitives = require('./primitives-CtuSNmV7.cjs');
|
|
20
|
+
const require_non_primitives = require('./non-primitives-D9zxCwX8.cjs');
|
|
21
|
+
const require_utilities = require('./utilities-CpF3uys3.cjs');
|
|
6
22
|
|
|
7
23
|
//#region src/guards.ts
|
|
8
24
|
/**
|
|
@@ -91,14 +107,19 @@ function isLeapYear(year) {
|
|
|
91
107
|
function isDateLike(value) {
|
|
92
108
|
if (value instanceof Date) return true;
|
|
93
109
|
if (require_non_primitives.isObject(value)) {
|
|
94
|
-
if (require_non_primitives.isFunction(value
|
|
95
|
-
if (require_non_primitives.isFunction(value
|
|
96
|
-
if (require_non_primitives.isFunction(value
|
|
97
|
-
if (require_non_primitives.isFunction(value
|
|
110
|
+
if (require_non_primitives.isFunction(value?.format) && require_non_primitives.isFunction(value?.toJSON) && require_non_primitives.isFunction(value?.toISOString)) return true;
|
|
111
|
+
if (require_non_primitives.isFunction(value?.toISO) && require_non_primitives.isFunction(value?.toFormat) && require_primitives.isBoolean(value?.isValid)) return true;
|
|
112
|
+
if (require_non_primitives.isFunction(value?.plus) && require_non_primitives.isFunction(value?.minus) && require_non_primitives.isFunction(value?.equals) && require_non_primitives.isFunction(value?.getClass)) return true;
|
|
113
|
+
if (require_non_primitives.isFunction(value?.toJSON) && require_non_primitives.isFunction(value?.toString) && [
|
|
114
|
+
"Instant",
|
|
115
|
+
"Duration",
|
|
98
116
|
"PlainDate",
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
117
|
+
"PlainTime",
|
|
118
|
+
"PlainDateTime",
|
|
119
|
+
"PlainMonthDay",
|
|
120
|
+
"PlainYearMonth",
|
|
121
|
+
"ZonedDateTime"
|
|
122
|
+
].includes(value?.constructor?.name)) return true;
|
|
102
123
|
}
|
|
103
124
|
return false;
|
|
104
125
|
}
|
package/dist/guards.d.cts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { Dt as TimeWithUnit, Lt as UTCOffset, Sn as Numeric, X as $TimeZoneIdentifier, jt as TimeZoneIdNative, ot as DateLike, rt as ClockTime } from "./types-CdmsXbU_.cjs";
|
|
2
18
|
|
|
3
19
|
//#region src/guards.d.ts
|
|
4
20
|
/**
|
|
@@ -64,7 +80,7 @@ declare function isLeapYear(year: Numeric): boolean;
|
|
|
64
80
|
* @param value Value to check if it is date-like object.
|
|
65
81
|
* @returns `true` if the value is date-like object, otherwise `false`.
|
|
66
82
|
*/
|
|
67
|
-
declare function isDateLike(value: unknown):
|
|
83
|
+
declare function isDateLike(value: unknown): value is DateLike;
|
|
68
84
|
/** Checks if a value represents time value (number) with different forms of {@link TimeWithUnit units} */
|
|
69
85
|
declare function isTimeWithUnit(value: unknown): value is TimeWithUnit;
|
|
70
86
|
//#endregion
|
package/dist/guards.d.mts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { Dt as TimeWithUnit, Lt as UTCOffset, Sn as Numeric, X as $TimeZoneIdentifier, jt as TimeZoneIdNative, ot as DateLike, rt as ClockTime } from "./types-Cb4gxrgJ.mjs";
|
|
2
18
|
|
|
3
19
|
//#region src/guards.d.ts
|
|
4
20
|
/**
|
|
@@ -64,7 +80,7 @@ declare function isLeapYear(year: Numeric): boolean;
|
|
|
64
80
|
* @param value Value to check if it is date-like object.
|
|
65
81
|
* @returns `true` if the value is date-like object, otherwise `false`.
|
|
66
82
|
*/
|
|
67
|
-
declare function isDateLike(value: unknown):
|
|
83
|
+
declare function isDateLike(value: unknown): value is DateLike;
|
|
68
84
|
/** Checks if a value represents time value (number) with different forms of {@link TimeWithUnit units} */
|
|
69
85
|
declare function isTimeWithUnit(value: unknown): value is TimeWithUnit;
|
|
70
86
|
//#endregion
|
package/dist/guards.mjs
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { n as NATIVE_TZ_IDS, t as IANA_TZ_IDS } from "./timezone-Db2CeL32.mjs";
|
|
18
|
+
import { n as isNonEmptyString, t as isBoolean } from "./primitives-dXzXlzJw.mjs";
|
|
19
|
+
import { r as isObject, t as isFunction } from "./non-primitives-DBtomDty.mjs";
|
|
20
|
+
import { a as isNumericString, n as normalizeNumber } from "./utilities-BKtVo78T.mjs";
|
|
5
21
|
|
|
6
22
|
//#region src/guards.ts
|
|
7
23
|
/**
|
|
@@ -90,14 +106,19 @@ function isLeapYear(year) {
|
|
|
90
106
|
function isDateLike(value) {
|
|
91
107
|
if (value instanceof Date) return true;
|
|
92
108
|
if (isObject(value)) {
|
|
93
|
-
if (isFunction(value
|
|
94
|
-
if (isFunction(value
|
|
95
|
-
if (isFunction(value
|
|
96
|
-
if (isFunction(value
|
|
109
|
+
if (isFunction(value?.format) && isFunction(value?.toJSON) && isFunction(value?.toISOString)) return true;
|
|
110
|
+
if (isFunction(value?.toISO) && isFunction(value?.toFormat) && isBoolean(value?.isValid)) return true;
|
|
111
|
+
if (isFunction(value?.plus) && isFunction(value?.minus) && isFunction(value?.equals) && isFunction(value?.getClass)) return true;
|
|
112
|
+
if (isFunction(value?.toJSON) && isFunction(value?.toString) && [
|
|
113
|
+
"Instant",
|
|
114
|
+
"Duration",
|
|
97
115
|
"PlainDate",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
116
|
+
"PlainTime",
|
|
117
|
+
"PlainDateTime",
|
|
118
|
+
"PlainMonthDay",
|
|
119
|
+
"PlainYearMonth",
|
|
120
|
+
"ZonedDateTime"
|
|
121
|
+
].includes(value?.constructor?.name)) return true;
|
|
101
122
|
}
|
|
102
123
|
return false;
|
|
103
124
|
}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const require_basic = require('./basic-DsQqC5nZ.cjs');
|
|
18
|
+
const require_primitives = require('./primitives-CtuSNmV7.cjs');
|
|
19
|
+
const require_non_primitives = require('./non-primitives-D9zxCwX8.cjs');
|
|
20
|
+
const require_utilities = require('./utilities-CpF3uys3.cjs');
|
|
5
21
|
const require_guards = require('./guards.cjs');
|
|
6
22
|
|
|
7
23
|
//#region src/utils/helpers.ts
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { c as MONTHS, d as SORTED_TIME_FORMATS, i as BN_SEASONS, o as DAYS, r as BN_MONTH_TABLES, u as MS_PER_DAY } from "./basic-DqKyujoj.mjs";
|
|
18
|
+
import { i as isString, n as isNonEmptyString } from "./primitives-dXzXlzJw.mjs";
|
|
19
|
+
import { a as isValidArray, i as isObjectWithKeys } from "./non-primitives-DBtomDty.mjs";
|
|
20
|
+
import { t as getOrdinal } from "./utilities-BKtVo78T.mjs";
|
|
5
21
|
import { isDate, isDateString, isLeapYear, isValidUTCOffset } from "./guards.mjs";
|
|
6
22
|
|
|
7
23
|
//#region src/utils/helpers.ts
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_basic = require('./basic-
|
|
3
|
-
const require_primitives = require('./primitives-
|
|
4
|
-
const require_non_primitives = require('./non-primitives-
|
|
18
|
+
const require_basic = require('./basic-DsQqC5nZ.cjs');
|
|
19
|
+
const require_primitives = require('./primitives-CtuSNmV7.cjs');
|
|
20
|
+
const require_non_primitives = require('./non-primitives-D9zxCwX8.cjs');
|
|
5
21
|
const require_guards = require('./guards.cjs');
|
|
6
|
-
const require_helpers = require('./helpers-
|
|
7
|
-
const require_utilities = require('./utilities-
|
|
22
|
+
const require_helpers = require('./helpers-CQzi908i.cjs');
|
|
23
|
+
const require_utilities = require('./utilities-D47SN9EZ.cjs');
|
|
8
24
|
|
|
9
25
|
//#region src/utils/chronos-fn.ts
|
|
10
26
|
/**
|
|
@@ -1219,8 +1235,8 @@ var Chronos = class Chronos {
|
|
|
1219
1235
|
}
|
|
1220
1236
|
/**
|
|
1221
1237
|
* @static Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC).
|
|
1222
|
-
* * It basically calls {@link Date.now()}.
|
|
1223
1238
|
* @returns The number of milliseconds elapsed since the Unix epoch.
|
|
1239
|
+
* @remarks It internally uses {@link Date.now()}.
|
|
1224
1240
|
*/
|
|
1225
1241
|
static now() {
|
|
1226
1242
|
return Date.now();
|
|
@@ -1345,12 +1361,12 @@ var Chronos = class Chronos {
|
|
|
1345
1361
|
* - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
|
|
1346
1362
|
* - For example, 2000 and 2400 are leap years, but 1900 and 2100 are not.
|
|
1347
1363
|
*
|
|
1348
|
-
* @
|
|
1349
|
-
* This method accepts different types of date inputs and extracts the year to check if it's a leap year.
|
|
1350
|
-
* If the provided date is a `number`, it will be treated as a year (must be a valid year from 0 to 9999).
|
|
1351
|
-
* If the year is out of this range (negative or larger than 9999), it will be treated as a Unix timestamp.
|
|
1352
|
-
* If the provided date is a string or a `Date` object, it will be parsed and the year will be extracted.
|
|
1353
|
-
* If a `Chronos` instance is passed, the year will be directly accessed from the instance.
|
|
1364
|
+
* @remarks
|
|
1365
|
+
* - This method accepts different types of date inputs and extracts the year to check if it's a leap year.
|
|
1366
|
+
* - If the provided date is a `number`, it will be treated as a year (must be a valid year from 0 to 9999).
|
|
1367
|
+
* - If the year is out of this range (negative or larger than 9999), it will be treated as a Unix timestamp.
|
|
1368
|
+
* - If the provided date is a string or a `Date` object, it will be parsed and the year will be extracted.
|
|
1369
|
+
* - If a `Chronos` instance is passed, the year will be directly accessed from the instance.
|
|
1354
1370
|
*
|
|
1355
1371
|
* @param date - A `number` (year or Unix timestamp), `string`, `Date`, or `Chronos` instance representing a date.
|
|
1356
1372
|
* @returns `true` if the year is a leap year, `false` otherwise.
|
|
@@ -1380,7 +1396,7 @@ var Chronos = class Chronos {
|
|
|
1380
1396
|
* @returns `true` if the value is a valid date string, otherwise `false`.
|
|
1381
1397
|
*/
|
|
1382
1398
|
static isDateString(value) {
|
|
1383
|
-
return
|
|
1399
|
+
return require_guards.isDateString(value);
|
|
1384
1400
|
}
|
|
1385
1401
|
/**
|
|
1386
1402
|
* @static Checks if the given value is an instance of `Chronos`.
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { D as INTERNALS } from "./seasons-CpUn45n6.cjs";
|
|
18
|
+
import { Bt as Chronos, Vt as chronos } from "./types-CdmsXbU_.cjs";
|
|
3
19
|
export { Chronos, INTERNALS, chronos };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { D as INTERNALS } from "./seasons-B_kjFWIX.mjs";
|
|
18
|
+
import { Bt as Chronos, Vt as chronos } from "./types-Cb4gxrgJ.mjs";
|
|
3
19
|
export { Chronos, INTERNALS, chronos };
|