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
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
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 { $ as ChronosStaticKey, $t as BanglaDayName, A as ChronosObject, At as TimeZoneId, B as WithoutOrigin, C as $Chronos, Ct as PositiveUTCHour, D as ChronosInput, Dt as TimeWithUnit, E as $StaticMethods, Et as TimeUnitValue, F as PluginMethods, Ft as TimestampOptions, G as $NativeTzNameOrId, Gt as $BnDatePadded, H as $GMTOffset, Ht as $BanglaMonth, I as RangeWithDates, It as UTCMinute, J as $TimeUnitVar, Jt as $BnYearPadded, K as $TZLabelKey, Kt as $BnEn, L as RelativeDateRange, Lt as UTCOffset, M as ChronosWithOptions, Mt as TimeZoneIdentifier, N as DateRangeOptions, Nt as TimeZoneName, O as ChronosInternals, Ot as TimeZone, P as DatesInRangeOptions, Pt as TimeZoneNameNative, Q as $UnitAnyCase, Qt as BanglaDateOptions, R as RelativeRangeOptions, Rt as WeekDay, S as ZodiacSign, St as NumberingSystem, T as $PluginMethods, Tt as TimeUnit, U as $ISOTimeString, Ut as $BanglaMonthDate, V as $DateUnit, W as $LocalArguments, Wt as $BanglaYear, X as $TimeZoneIdentifier, Xt as BanglaDateFormat, Y as $TimeUnitVarMap, Yt as BanglaDate, Z as $UTCOffset, Zt as BanglaDateObject, _ as ZodiacArray, _n as TimeFormatToken, _t as Milliseconds, a as BusinessOptionsWeekends, an as BnCalendarVariant, at as DateFormatOptions, b as ZodiacOptions, bn as YearToken, bt as MonthString, c as DayPart, cn as DateToken, ct as DateTimeFormatOptions, d as DurationOptions, dn as HourToken, dt as GreetingConfigs, en as BanglaMonth, et as ClockHour, f as MonthBoundary, fn as MSToken, ft as HourMinutes, g as TimeDuration, gn as StrictFormat, gt as LocalesArguments, h as SeasonPreset, hn as SecondToken, ht as LocaleCalendar, i as BusinessOptionsBasic, in as BnCalendarConfig, it as DateArgs, j as ChronosProperties, jt as TimeZoneIdNative, k as ChronosMethods, kt as TimeZoneDetails, l as DayPartConfig, ln as DayToken, lt as FormatOptions, m as SeasonOptions, mn as MonthToken, mt as ISODateTimeString, n as $BusinessHourOptions, nn as BanglaSeasonName, nt as ClockSecond, o as ChronosPlugin, on as DateWithSeasonToken, ot as DateLike, p as SeasonDefinition, pn as MinuteToken, pt as ISODateFormat, q as $TimeUnitKey, qt as $BnMonthPadded, r as AcademicYear, rn as BanglaYear, rt as ClockTime, s as DateBoundary, sn as DateFormatToken, st as DateString, t as $BusinessHourBaseOptions, tn as BanglaMonthName, tt as ClockMinute, u as DurationKey, un as FormatToken, ut as FromNowUnit, v as ZodiacMeta, vn as TimeOnlyFormat, vt as MonthDateString, w as $InstanceMethods, wt as Quarter, x as ZodiacPreset, xt as NegativeUTCHour, y as ZodiacMetaOptions, yn as TimeToken, yt as MonthName, z as WeekdayOptions, zt as ChronosStatics } from "./types-Cb4gxrgJ.mjs";
|
|
18
|
+
export { $BanglaMonth, $BanglaMonthDate, $BanglaYear, $BnDatePadded, $BnEn, $BnMonthPadded, $BnYearPadded, $BusinessHourBaseOptions, $BusinessHourOptions, $Chronos, $DateUnit, $GMTOffset, $ISOTimeString, $InstanceMethods, $LocalArguments, $NativeTzNameOrId, $PluginMethods, $StaticMethods, $TZLabelKey, $TimeUnitKey, $TimeUnitVar, $TimeUnitVarMap, $TimeZoneIdentifier, $UTCOffset, $UnitAnyCase, AcademicYear, BanglaDate, BanglaDateFormat, BanglaDateObject, BanglaDateOptions, BanglaDayName, BanglaMonth, BanglaMonthName, BanglaSeasonName, BanglaYear, BnCalendarConfig, BnCalendarVariant, BusinessOptionsBasic, BusinessOptionsWeekends, ChronosInput, ChronosInternals, ChronosMethods, ChronosObject, ChronosPlugin, ChronosProperties, ChronosStaticKey, ChronosStatics, ChronosWithOptions, ClockHour, ClockMinute, ClockSecond, ClockTime, DateArgs, DateBoundary, DateFormatOptions, DateFormatToken, DateLike, DateRangeOptions, DateString, DateTimeFormatOptions, DateToken, DateWithSeasonToken, DatesInRangeOptions, DayPart, DayPartConfig, DayToken, DurationKey, DurationOptions, FormatOptions, FormatToken, FromNowUnit, GreetingConfigs, HourMinutes, HourToken, ISODateFormat, ISODateTimeString, LocaleCalendar, LocalesArguments, MSToken, Milliseconds, MinuteToken, MonthBoundary, MonthDateString, MonthName, MonthString, MonthToken, NegativeUTCHour, NumberingSystem, PluginMethods, PositiveUTCHour, Quarter, RangeWithDates, RelativeDateRange, RelativeRangeOptions, SeasonDefinition, SeasonOptions, SeasonPreset, SecondToken, StrictFormat, TimeDuration, TimeFormatToken, TimeOnlyFormat, TimeToken, TimeUnit, TimeUnitValue, TimeWithUnit, TimeZone, TimeZoneDetails, TimeZoneId, TimeZoneIdNative, TimeZoneIdentifier, TimeZoneName, TimeZoneNameNative, TimestampOptions, UTCMinute, UTCOffset, WeekDay, WeekdayOptions, WithoutOrigin, YearToken, ZodiacArray, ZodiacMeta, ZodiacMetaOptions, ZodiacOptions, ZodiacPreset, ZodiacSign };
|
package/dist/types.mjs
CHANGED
|
@@ -1 +1,17 @@
|
|
|
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
|
export { };
|
|
@@ -1,9 +1,25 @@
|
|
|
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 } from "./timezone-Db2CeL32.mjs";
|
|
18
|
+
import { a as isUndefined } from "./primitives-dXzXlzJw.mjs";
|
|
19
|
+
import { r as isObject } from "./non-primitives-DBtomDty.mjs";
|
|
20
|
+
import { n as normalizeNumber } from "./utilities-BKtVo78T.mjs";
|
|
5
21
|
import { isValidUTCOffset } from "./guards.mjs";
|
|
6
|
-
import { n as _dateArgsToDate, p as _resolveNativeTzName, r as _formatDate, s as _gmtToUtcOffset, u as _normalizeOffset } from "./helpers-
|
|
22
|
+
import { n as _dateArgsToDate, p as _resolveNativeTzName, r as _formatDate, s as _gmtToUtcOffset, u as _normalizeOffset } from "./helpers-DEf4sevD.mjs";
|
|
7
23
|
|
|
8
24
|
//#region src/utils/utilities.ts
|
|
9
25
|
/**
|
|
@@ -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 { i as isString, r as isNumber } from "./primitives-dXzXlzJw.mjs";
|
|
2
18
|
|
|
3
19
|
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/guards/specials.js
|
|
4
20
|
function isNumericString(value) {
|
|
@@ -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/guards/specials.js
|
|
4
20
|
function isNumericString(value) {
|
|
@@ -1,9 +1,25 @@
|
|
|
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_timezone = require('./timezone-BNnHFgki.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
|
-
const require_helpers = require('./helpers-
|
|
22
|
+
const require_helpers = require('./helpers-CQzi908i.cjs');
|
|
7
23
|
|
|
8
24
|
//#region src/utils/utilities.ts
|
|
9
25
|
/**
|
package/dist/utils.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_utilities = require('./utilities-
|
|
18
|
+
const require_basic = require('./basic-DsQqC5nZ.cjs');
|
|
19
|
+
const require_primitives = require('./primitives-CtuSNmV7.cjs');
|
|
20
|
+
const require_utilities = require('./utilities-CpF3uys3.cjs');
|
|
5
21
|
const require_guards = require('./guards.cjs');
|
|
6
|
-
const require_utilities$1 = require('./utilities-
|
|
7
|
-
const require_greet = require('./greet-
|
|
22
|
+
const require_utilities$1 = require('./utilities-D47SN9EZ.cjs');
|
|
23
|
+
const require_greet = require('./greet-hjVsd2dt.cjs');
|
|
8
24
|
|
|
9
25
|
//#region src/utils/parser.ts
|
|
10
26
|
/**
|
package/dist/utils.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, Ft as TimestampOptions, Lt as UTCOffset, Sn as Numeric, X as $TimeZoneIdentifier, at as DateFormatOptions, dt as GreetingConfigs, ft as HourMinutes, gn as StrictFormat, it as DateArgs, jt as TimeZoneIdNative, kt as TimeZoneDetails, mt as ISODateTimeString, pt as ISODateFormat, rt as ClockTime, vn as TimeOnlyFormat, xn as Maybe } from "./types-CdmsXbU_.cjs";
|
|
2
18
|
|
|
3
19
|
//#region src/utils/greet.d.ts
|
|
4
20
|
/**
|
|
@@ -155,7 +171,7 @@ declare function formatDateRelative(date: Maybe<DateArgs>, format?: StrictFormat
|
|
|
155
171
|
*
|
|
156
172
|
* @returns Timestamp string in ISO 8601 format.
|
|
157
173
|
*/
|
|
158
|
-
declare function getTimestamp():
|
|
174
|
+
declare function getTimestamp(): ISODateTimeString;
|
|
159
175
|
/**
|
|
160
176
|
* * Get timestamp in ISO 8601 format.
|
|
161
177
|
*
|
|
@@ -171,7 +187,7 @@ declare function getTimestamp(): ISOTimeString;
|
|
|
171
187
|
*
|
|
172
188
|
* @returns Timestamp string in ISO 8601 format.
|
|
173
189
|
*/
|
|
174
|
-
declare function getTimestamp(value: DateArgs, format?:
|
|
190
|
+
declare function getTimestamp<F extends ISODateFormat = 'utc'>(value: DateArgs, format?: F): ISODateTimeString<F>;
|
|
175
191
|
/**
|
|
176
192
|
* * Get timestamp in ISO 8601 format.
|
|
177
193
|
*
|
|
@@ -183,6 +199,6 @@ declare function getTimestamp(value: DateArgs, format?: ISODateFormat): ISOTimeS
|
|
|
183
199
|
*
|
|
184
200
|
* @returns Timestamp string in ISO 8601 format.
|
|
185
201
|
*/
|
|
186
|
-
declare function getTimestamp(options: TimestampOptions):
|
|
202
|
+
declare function getTimestamp<F extends ISODateFormat = 'utc'>(options: TimestampOptions<F>): ISODateTimeString<F>;
|
|
187
203
|
//#endregion
|
|
188
204
|
export { convertMinutesToTime as convertMinutesToHourMinutes, convertMinutesToTime, convertMinutesToTime as getHourMinutesFromMinutes, convertMinutesToTime as getTimeFromMinutes, formatUTCOffset as convertMinutesToUTCOffset, formatUTCOffset, formatUTCOffset as minutesToUTCOffset, extractHourMinute, extractMinutesFromUTC, extractMinutesFromUTC as getMinutesFromUTC, extractMinutesFromUTC as getTotalMinutesFromUTC, extractTimeFromUTC, extractTimeFromUTC as extractTimeStringFromUTC, extractTimeFromUTC as getTimeStringFromUTC, getTotalMinutes as extractTotalMinutesFromTime, getTotalMinutes, getTotalMinutes as getTotalMinutesFromTime, formatDate, formatDate as formatDateTime, formatDateRelative, formatDateRelative as formatRelativeDate, formatDateRelative as formatRelativeTime, formatTimePart, getGreeting as generateGreeting, getGreeting, getGreeting as greet, getNativeTimeZoneId, getTimeZoneDetails, getTimeZoneIds, getTimestamp, parseMSec, parseMSec as parseMs };
|
package/dist/utils.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, Ft as TimestampOptions, Lt as UTCOffset, Sn as Numeric, X as $TimeZoneIdentifier, at as DateFormatOptions, dt as GreetingConfigs, ft as HourMinutes, gn as StrictFormat, it as DateArgs, jt as TimeZoneIdNative, kt as TimeZoneDetails, mt as ISODateTimeString, pt as ISODateFormat, rt as ClockTime, vn as TimeOnlyFormat, xn as Maybe } from "./types-Cb4gxrgJ.mjs";
|
|
2
18
|
|
|
3
19
|
//#region src/utils/greet.d.ts
|
|
4
20
|
/**
|
|
@@ -155,7 +171,7 @@ declare function formatDateRelative(date: Maybe<DateArgs>, format?: StrictFormat
|
|
|
155
171
|
*
|
|
156
172
|
* @returns Timestamp string in ISO 8601 format.
|
|
157
173
|
*/
|
|
158
|
-
declare function getTimestamp():
|
|
174
|
+
declare function getTimestamp(): ISODateTimeString;
|
|
159
175
|
/**
|
|
160
176
|
* * Get timestamp in ISO 8601 format.
|
|
161
177
|
*
|
|
@@ -171,7 +187,7 @@ declare function getTimestamp(): ISOTimeString;
|
|
|
171
187
|
*
|
|
172
188
|
* @returns Timestamp string in ISO 8601 format.
|
|
173
189
|
*/
|
|
174
|
-
declare function getTimestamp(value: DateArgs, format?:
|
|
190
|
+
declare function getTimestamp<F extends ISODateFormat = 'utc'>(value: DateArgs, format?: F): ISODateTimeString<F>;
|
|
175
191
|
/**
|
|
176
192
|
* * Get timestamp in ISO 8601 format.
|
|
177
193
|
*
|
|
@@ -183,6 +199,6 @@ declare function getTimestamp(value: DateArgs, format?: ISODateFormat): ISOTimeS
|
|
|
183
199
|
*
|
|
184
200
|
* @returns Timestamp string in ISO 8601 format.
|
|
185
201
|
*/
|
|
186
|
-
declare function getTimestamp(options: TimestampOptions):
|
|
202
|
+
declare function getTimestamp<F extends ISODateFormat = 'utc'>(options: TimestampOptions<F>): ISODateTimeString<F>;
|
|
187
203
|
//#endregion
|
|
188
204
|
export { convertMinutesToTime as convertMinutesToHourMinutes, convertMinutesToTime, convertMinutesToTime as getHourMinutesFromMinutes, convertMinutesToTime as getTimeFromMinutes, formatUTCOffset as convertMinutesToUTCOffset, formatUTCOffset, formatUTCOffset as minutesToUTCOffset, extractHourMinute, extractMinutesFromUTC, extractMinutesFromUTC as getMinutesFromUTC, extractMinutesFromUTC as getTotalMinutesFromUTC, extractTimeFromUTC, extractTimeFromUTC as extractTimeStringFromUTC, extractTimeFromUTC as getTimeStringFromUTC, getTotalMinutes as extractTotalMinutesFromTime, getTotalMinutes, getTotalMinutes as getTotalMinutesFromTime, formatDate, formatDate as formatDateTime, formatDateRelative, formatDateRelative as formatRelativeDate, formatDateRelative as formatRelativeTime, formatTimePart, getGreeting as generateGreeting, getGreeting, getGreeting as greet, getNativeTimeZoneId, getTimeZoneDetails, getTimeZoneIds, getTimestamp, parseMSec, parseMSec as parseMs };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
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 { l as MS_MAP } from "./basic-DqKyujoj.mjs";
|
|
18
|
+
import { n as isNonEmptyString, r as isNumber } from "./primitives-dXzXlzJw.mjs";
|
|
19
|
+
import { a as isNumericString } from "./utilities-BKtVo78T.mjs";
|
|
4
20
|
import { isTimeWithUnit } from "./guards.mjs";
|
|
5
|
-
import { a as formatDate, c as formatUTCOffset, d as getTimeZoneIds, f as getTimestamp, i as extractTimeFromUTC, l as getNativeTimeZoneId, n as extractHourMinute, o as formatDateRelative, p as getTotalMinutes, r as extractMinutesFromUTC, s as formatTimePart, t as convertMinutesToTime, u as getTimeZoneDetails } from "./utilities-
|
|
6
|
-
import { t as getGreeting } from "./greet-
|
|
21
|
+
import { a as formatDate, c as formatUTCOffset, d as getTimeZoneIds, f as getTimestamp, i as extractTimeFromUTC, l as getNativeTimeZoneId, n as extractHourMinute, o as formatDateRelative, p as getTotalMinutes, r as extractMinutesFromUTC, s as formatTimePart, t as convertMinutesToTime, u as getTimeZoneDetails } from "./utilities-BGX8dviZ.mjs";
|
|
22
|
+
import { t as getGreeting } from "./greet-D07t2_e6.mjs";
|
|
7
23
|
|
|
8
24
|
//#region src/utils/parser.ts
|
|
9
25
|
/**
|
package/package.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chronos-date",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Flexible date-time library for any JavaScript and TypeScript environment.",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"keywords": [
|
|
9
|
+
"day",
|
|
9
10
|
"time",
|
|
10
11
|
"date",
|
|
12
|
+
"moment",
|
|
13
|
+
"chronos",
|
|
14
|
+
"date-fns",
|
|
11
15
|
"chronos-date",
|
|
12
16
|
"date-utilities",
|
|
13
17
|
"date-helper",
|
|
@@ -52,10 +56,10 @@
|
|
|
52
56
|
},
|
|
53
57
|
"license": "Apache-2.0",
|
|
54
58
|
"devDependencies": {
|
|
55
|
-
"@biomejs/biome": "^2.4.
|
|
56
|
-
"@types/node": "^25.
|
|
59
|
+
"@biomejs/biome": "^2.4.15",
|
|
60
|
+
"@types/node": "^25.7.0",
|
|
57
61
|
"husky": "^9.1.7",
|
|
58
|
-
"lint-staged": "^17.0.
|
|
62
|
+
"lint-staged": "^17.0.4",
|
|
59
63
|
"nhb-scripts": "^1.9.2",
|
|
60
64
|
"nhb-toolbox": "^4.30.1",
|
|
61
65
|
"tsdown": "^0.22.0",
|
|
@@ -150,6 +154,8 @@
|
|
|
150
154
|
"scripts": {
|
|
151
155
|
"build": "tsdown",
|
|
152
156
|
"dev:pkg": "tsdown --watch",
|
|
157
|
+
"dev:docs": "pnpm --filter chronos-date-docs dev",
|
|
158
|
+
"build:docs": "pnpm --filter chronos-date-docs build",
|
|
153
159
|
"typecheck": "tsc --noEmit",
|
|
154
160
|
"commit": "nhb-commit",
|
|
155
161
|
"count": "nhb-count",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/guards/primitives.js
|
|
2
|
-
function isNumber(value) {
|
|
3
|
-
return typeof value === "number" && Number.isFinite(value);
|
|
4
|
-
}
|
|
5
|
-
function isString(value) {
|
|
6
|
-
return typeof value === "string";
|
|
7
|
-
}
|
|
8
|
-
function isBoolean(value) {
|
|
9
|
-
return typeof value === "boolean";
|
|
10
|
-
}
|
|
11
|
-
function isUndefined(value) {
|
|
12
|
-
return value === void 0;
|
|
13
|
-
}
|
|
14
|
-
function isNonEmptyString(value) {
|
|
15
|
-
return isString(value) && value?.length > 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { isUndefined as a, isString as i, isNonEmptyString as n, isNumber as r, isBoolean as t };
|