@duplojs/utils 1.4.57 → 1.4.58
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/clean/constraint/base.d.ts +6 -4
- package/dist/clean/constraint/defaultConstraint/index.d.ts +1 -0
- package/dist/clean/constraint/defaultConstraint/number.d.ts +6 -6
- package/dist/clean/constraint/defaultConstraint/string.d.ts +4 -4
- package/dist/clean/constraint/defaultConstraint/time.cjs +19 -0
- package/dist/clean/constraint/defaultConstraint/time.d.ts +61 -0
- package/dist/clean/constraint/defaultConstraint/time.mjs +16 -0
- package/dist/clean/constraint/set.d.ts +6 -4
- package/dist/clean/entity.d.ts +2 -1
- package/dist/clean/index.cjs +3 -0
- package/dist/clean/index.mjs +1 -0
- package/dist/clean/newType.d.ts +7 -5
- package/dist/clean/primitive/base.d.ts +25 -34
- package/dist/clean/primitive/operations/date/dateAddTime.d.ts +7 -11
- package/dist/clean/primitive/operations/date/dateGreaterThan.d.ts +9 -7
- package/dist/clean/primitive/operations/date/dateLessThan.d.ts +9 -7
- package/dist/clean/primitive/operations/date/dateMax.d.ts +3 -10
- package/dist/clean/primitive/operations/date/dateMin.d.ts +3 -10
- package/dist/clean/primitive/operations/date/dateSubtractTime.d.ts +7 -11
- package/dist/clean/primitive/operations/equal.cjs +1 -1
- package/dist/clean/primitive/operations/equal.d.ts +3 -3
- package/dist/clean/primitive/operations/equal.mjs +1 -1
- package/dist/clean/primitive/operations/sort.d.ts +8 -10
- package/dist/clean/primitive/operations/time/timeGreaterThan.d.ts +11 -9
- package/dist/clean/primitive/operations/time/timeLessThan.d.ts +11 -9
- package/dist/clean/primitive/operations/time/timeMax.cjs +2 -2
- package/dist/clean/primitive/operations/time/timeMax.d.ts +10 -17
- package/dist/clean/primitive/operations/time/timeMax.mjs +2 -2
- package/dist/clean/primitive/operations/time/timeMin.cjs +3 -3
- package/dist/clean/primitive/operations/time/timeMin.d.ts +10 -17
- package/dist/clean/primitive/operations/time/timeMin.mjs +3 -3
- package/dist/clean/unwrapEntity.cjs +13 -3
- package/dist/clean/unwrapEntity.d.ts +57 -5
- package/dist/clean/unwrapEntity.mjs +13 -3
- package/dist/common/index.d.ts +2 -4
- package/dist/common/kind.d.ts +1 -0
- package/dist/common/transformer.cjs +45 -0
- package/dist/common/transformer.d.ts +61 -0
- package/dist/common/transformer.mjs +40 -0
- package/dist/common/types/DeepReadonly.d.ts +1 -1
- package/dist/common/types/toLargeEnsemble.d.ts +2 -2
- package/dist/dataParser/extended/date.d.ts +9 -4
- package/dist/dataParser/extended/time.d.ts +28 -12
- package/dist/dataParser/identifier.d.ts +20 -8
- package/dist/dataParser/parsers/date.cjs +16 -12
- package/dist/dataParser/parsers/date.d.ts +15 -9
- package/dist/dataParser/parsers/date.mjs +16 -12
- package/dist/dataParser/parsers/time/checkers/max.cjs +3 -0
- package/dist/dataParser/parsers/time/checkers/max.d.ts +28 -0
- package/dist/dataParser/parsers/time/checkers/max.mjs +3 -0
- package/dist/dataParser/parsers/time/checkers/min.cjs +3 -0
- package/dist/dataParser/parsers/time/checkers/min.d.ts +28 -0
- package/dist/dataParser/parsers/time/checkers/min.mjs +3 -0
- package/dist/dataParser/parsers/time/index.cjs +14 -10
- package/dist/dataParser/parsers/time/index.d.ts +15 -9
- package/dist/dataParser/parsers/time/index.mjs +14 -10
- package/dist/date/applyTimezone.cjs +4 -4
- package/dist/date/applyTimezone.d.ts +18 -16
- package/dist/date/applyTimezone.mjs +2 -2
- package/dist/date/closestTo.cjs +6 -2
- package/dist/date/closestTo.d.ts +15 -15
- package/dist/date/closestTo.mjs +6 -2
- package/dist/date/constants.cjs +4 -4
- package/dist/date/constants.d.ts +2 -2
- package/dist/date/constants.mjs +3 -3
- package/dist/date/create.cjs +20 -10
- package/dist/date/create.d.ts +24 -38
- package/dist/date/create.mjs +21 -11
- package/dist/date/createOrThrow.d.ts +18 -20
- package/dist/date/createTime.cjs +16 -7
- package/dist/date/createTime.d.ts +19 -18
- package/dist/date/createTime.mjs +17 -8
- package/dist/date/createTimeOrThrow.d.ts +17 -20
- package/dist/date/each.cjs +6 -4
- package/dist/date/each.d.ts +21 -19
- package/dist/date/each.mjs +6 -4
- package/dist/date/format.d.ts +17 -15
- package/dist/date/formatTime.d.ts +17 -16
- package/dist/date/getTimezoneOffset.cjs +6 -3
- package/dist/date/getTimezoneOffset.d.ts +17 -18
- package/dist/date/getTimezoneOffset.mjs +6 -3
- package/dist/date/getters/getDayOfMonth.cjs +3 -3
- package/dist/date/getters/getDayOfMonth.d.ts +20 -14
- package/dist/date/getters/getDayOfMonth.mjs +3 -3
- package/dist/date/getters/getDayOfWeek.cjs +3 -3
- package/dist/date/getters/getDayOfWeek.d.ts +15 -12
- package/dist/date/getters/getDayOfWeek.mjs +3 -3
- package/dist/date/getters/getDayOfYear.cjs +6 -6
- package/dist/date/getters/getDayOfYear.d.ts +21 -13
- package/dist/date/getters/getDayOfYear.mjs +6 -6
- package/dist/date/getters/getFirstDayOfMonth.cjs +2 -3
- package/dist/date/getters/getFirstDayOfMonth.d.ts +16 -10
- package/dist/date/getters/getFirstDayOfMonth.mjs +2 -3
- package/dist/date/getters/getFirstDayOfWeek.cjs +2 -3
- package/dist/date/getters/getFirstDayOfWeek.d.ts +17 -10
- package/dist/date/getters/getFirstDayOfWeek.mjs +2 -3
- package/dist/date/getters/getHour.cjs +3 -3
- package/dist/date/getters/getHour.d.ts +16 -14
- package/dist/date/getters/getHour.mjs +3 -3
- package/dist/date/getters/getLastDayOfMonth.cjs +2 -3
- package/dist/date/getters/getLastDayOfMonth.d.ts +16 -10
- package/dist/date/getters/getLastDayOfMonth.mjs +2 -3
- package/dist/date/getters/getLastDayOfWeek.cjs +2 -3
- package/dist/date/getters/getLastDayOfWeek.d.ts +17 -10
- package/dist/date/getters/getLastDayOfWeek.mjs +2 -3
- package/dist/date/getters/getMilliseconds.cjs +2 -2
- package/dist/date/getters/getMilliseconds.d.ts +11 -9
- package/dist/date/getters/getMilliseconds.mjs +2 -2
- package/dist/date/getters/getMinute.cjs +3 -3
- package/dist/date/getters/getMinute.d.ts +17 -15
- package/dist/date/getters/getMinute.mjs +3 -3
- package/dist/date/getters/getMonth.cjs +3 -3
- package/dist/date/getters/getMonth.d.ts +20 -15
- package/dist/date/getters/getMonth.mjs +3 -3
- package/dist/date/getters/getSecond.cjs +3 -3
- package/dist/date/getters/getSecond.d.ts +17 -15
- package/dist/date/getters/getSecond.mjs +3 -3
- package/dist/date/getters/getWeekOfYear.cjs +12 -11
- package/dist/date/getters/getWeekOfYear.d.ts +17 -11
- package/dist/date/getters/getWeekOfYear.mjs +12 -11
- package/dist/date/getters/getYear.cjs +3 -3
- package/dist/date/getters/getYear.d.ts +16 -15
- package/dist/date/getters/getYear.mjs +3 -3
- package/dist/date/index.cjs +12 -6
- package/dist/date/index.d.ts +5 -2
- package/dist/date/index.mjs +6 -3
- package/dist/date/is.cjs +3 -8
- package/dist/date/is.d.ts +9 -14
- package/dist/date/is.mjs +3 -8
- package/dist/date/isSafeTimeValue.d.ts +9 -13
- package/dist/date/isSafeTimestamp.d.ts +7 -16
- package/dist/date/isSerializedTheDate.cjs +20 -0
- package/dist/date/isSerializedTheDate.d.ts +31 -0
- package/dist/date/isSerializedTheDate.mjs +18 -0
- package/dist/date/isSerializedTheTime.cjs +20 -0
- package/dist/date/isSerializedTheTime.d.ts +31 -0
- package/dist/date/isSerializedTheTime.mjs +18 -0
- package/dist/date/isTime.cjs +3 -8
- package/dist/date/isTime.d.ts +7 -14
- package/dist/date/isTime.mjs +3 -8
- package/dist/date/kind.cjs +9 -0
- package/dist/date/kind.d.ts +1 -0
- package/dist/date/kind.mjs +7 -0
- package/dist/date/makeSafeTimeValue.d.ts +12 -11
- package/dist/date/makeSafeTimestamp.d.ts +12 -11
- package/dist/date/max.cjs +2 -2
- package/dist/date/max.d.ts +13 -13
- package/dist/date/max.mjs +2 -2
- package/dist/date/maxTime.cjs +2 -2
- package/dist/date/maxTime.d.ts +13 -21
- package/dist/date/maxTime.mjs +2 -2
- package/dist/date/min.cjs +2 -2
- package/dist/date/min.d.ts +13 -13
- package/dist/date/min.mjs +2 -2
- package/dist/date/minTime.cjs +2 -2
- package/dist/date/minTime.d.ts +13 -21
- package/dist/date/minTime.mjs +2 -2
- package/dist/date/now.cjs +3 -1
- package/dist/date/now.d.ts +9 -7
- package/dist/date/now.mjs +3 -1
- package/dist/date/operators/addDays.cjs +3 -5
- package/dist/date/operators/addDays.d.ts +14 -11
- package/dist/date/operators/addDays.mjs +3 -5
- package/dist/date/operators/addHours.cjs +3 -5
- package/dist/date/operators/addHours.d.ts +14 -11
- package/dist/date/operators/addHours.mjs +3 -5
- package/dist/date/operators/addMilliseconds.cjs +3 -5
- package/dist/date/operators/addMilliseconds.d.ts +14 -11
- package/dist/date/operators/addMilliseconds.mjs +3 -5
- package/dist/date/operators/addMinutes.cjs +3 -5
- package/dist/date/operators/addMinutes.d.ts +14 -11
- package/dist/date/operators/addMinutes.mjs +3 -5
- package/dist/date/operators/addMonths.cjs +2 -2
- package/dist/date/operators/addMonths.d.ts +13 -13
- package/dist/date/operators/addMonths.mjs +2 -2
- package/dist/date/operators/addSeconds.cjs +3 -5
- package/dist/date/operators/addSeconds.d.ts +14 -11
- package/dist/date/operators/addSeconds.mjs +3 -5
- package/dist/date/operators/addTime.cjs +13 -6
- package/dist/date/operators/addTime.d.ts +20 -18
- package/dist/date/operators/addTime.mjs +13 -6
- package/dist/date/operators/addWeeks.cjs +6 -5
- package/dist/date/operators/addWeeks.d.ts +14 -11
- package/dist/date/operators/addWeeks.mjs +6 -5
- package/dist/date/operators/addYears.cjs +2 -2
- package/dist/date/operators/addYears.d.ts +13 -13
- package/dist/date/operators/addYears.mjs +2 -2
- package/dist/date/operators/between.d.ts +11 -11
- package/dist/date/operators/betweenThan.d.ts +11 -11
- package/dist/date/operators/betweenThanTime.d.ts +18 -22
- package/dist/date/operators/betweenTime.d.ts +17 -21
- package/dist/date/operators/greater.d.ts +12 -9
- package/dist/date/operators/greaterThan.d.ts +14 -11
- package/dist/date/operators/greaterThanTime.d.ts +17 -21
- package/dist/date/operators/greaterTime.d.ts +16 -20
- package/dist/date/operators/less.d.ts +12 -9
- package/dist/date/operators/lessThan.d.ts +13 -10
- package/dist/date/operators/lessThanTime.d.ts +17 -21
- package/dist/date/operators/lessTime.d.ts +16 -20
- package/dist/date/operators/subtractDays.cjs +3 -5
- package/dist/date/operators/subtractDays.d.ts +14 -11
- package/dist/date/operators/subtractDays.mjs +3 -5
- package/dist/date/operators/subtractHours.cjs +3 -5
- package/dist/date/operators/subtractHours.d.ts +14 -11
- package/dist/date/operators/subtractHours.mjs +3 -5
- package/dist/date/operators/subtractMilliseconds.cjs +3 -5
- package/dist/date/operators/subtractMilliseconds.d.ts +14 -11
- package/dist/date/operators/subtractMilliseconds.mjs +3 -5
- package/dist/date/operators/subtractMinutes.cjs +3 -5
- package/dist/date/operators/subtractMinutes.d.ts +14 -11
- package/dist/date/operators/subtractMinutes.mjs +3 -5
- package/dist/date/operators/subtractMonths.cjs +2 -2
- package/dist/date/operators/subtractMonths.d.ts +17 -11
- package/dist/date/operators/subtractMonths.mjs +2 -2
- package/dist/date/operators/subtractSeconds.cjs +3 -5
- package/dist/date/operators/subtractSeconds.d.ts +14 -11
- package/dist/date/operators/subtractSeconds.mjs +3 -5
- package/dist/date/operators/subtractTime.cjs +13 -6
- package/dist/date/operators/subtractTime.d.ts +20 -18
- package/dist/date/operators/subtractTime.mjs +13 -6
- package/dist/date/operators/subtractWeeks.cjs +3 -5
- package/dist/date/operators/subtractWeeks.d.ts +14 -11
- package/dist/date/operators/subtractWeeks.mjs +3 -5
- package/dist/date/operators/subtractYears.cjs +2 -2
- package/dist/date/operators/subtractYears.d.ts +17 -11
- package/dist/date/operators/subtractYears.mjs +2 -2
- package/dist/date/round.cjs +2 -2
- package/dist/date/round.d.ts +11 -14
- package/dist/date/round.mjs +2 -2
- package/dist/date/serialize.cjs +14 -0
- package/dist/date/serialize.d.ts +41 -0
- package/dist/date/serialize.mjs +12 -0
- package/dist/date/sort.cjs +2 -2
- package/dist/date/sort.d.ts +16 -15
- package/dist/date/sort.mjs +2 -2
- package/dist/date/sortTimes.cjs +2 -2
- package/dist/date/sortTimes.d.ts +15 -21
- package/dist/date/sortTimes.mjs +2 -2
- package/dist/date/theDate.cjs +124 -0
- package/dist/date/theDate.d.ts +114 -0
- package/dist/date/theDate.mjs +122 -0
- package/dist/date/theTime.cjs +36 -0
- package/dist/date/theTime.d.ts +53 -0
- package/dist/date/theTime.mjs +34 -0
- package/dist/date/timezone.cjs +3 -0
- package/dist/date/timezone.d.ts +27 -0
- package/dist/date/timezone.mjs +3 -0
- package/dist/date/toISOString.cjs +5 -2
- package/dist/date/toISOString.d.ts +12 -10
- package/dist/date/toISOString.mjs +5 -2
- package/dist/date/toNative.cjs +4 -0
- package/dist/date/toNative.d.ts +12 -10
- package/dist/date/toNative.mjs +4 -0
- package/dist/date/toTimeValue.cjs +6 -2
- package/dist/date/toTimeValue.d.ts +14 -12
- package/dist/date/toTimeValue.mjs +6 -2
- package/dist/date/toTimestamp.cjs +5 -3
- package/dist/date/toTimestamp.d.ts +11 -9
- package/dist/date/toTimestamp.mjs +6 -4
- package/dist/date/today.cjs +3 -1
- package/dist/date/today.d.ts +14 -7
- package/dist/date/today.mjs +3 -1
- package/dist/date/tomorrow.cjs +2 -1
- package/dist/date/tomorrow.d.ts +12 -7
- package/dist/date/tomorrow.mjs +2 -1
- package/dist/date/types/index.d.ts +2 -2
- package/dist/date/types/serializedTheDate.d.ts +1 -0
- package/dist/date/types/serializedTheTime.d.ts +42 -0
- package/dist/date/types/spoolingDate.d.ts +2 -1
- package/dist/date/yesterday.cjs +2 -1
- package/dist/date/yesterday.d.ts +12 -7
- package/dist/date/yesterday.mjs +2 -1
- package/dist/index.cjs +5 -6
- package/dist/index.mjs +1 -3
- package/dist/metadata.json +73 -46
- package/package.json +1 -1
- package/dist/common/toJSON.cjs +0 -37
- package/dist/common/toJSON.d.ts +0 -44
- package/dist/common/toJSON.mjs +0 -35
- package/dist/common/toString.cjs +0 -10
- package/dist/common/toString.d.ts +0 -17
- package/dist/common/toString.mjs +0 -8
- package/dist/common/toTransform.cjs +0 -37
- package/dist/common/toTransform.d.ts +0 -50
- package/dist/common/toTransform.mjs +0 -35
- package/dist/date/createTheDate.cjs +0 -13
- package/dist/date/createTheDate.d.ts +0 -28
- package/dist/date/createTheDate.mjs +0 -11
- package/dist/date/createTheTime.cjs +0 -13
- package/dist/date/createTheTime.d.ts +0 -25
- package/dist/date/createTheTime.mjs +0 -11
- package/dist/date/types/theDate.d.ts +0 -11
- package/dist/date/types/theTime.d.ts +0 -10
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { kindHeritage } from '../common/kind.mjs';
|
|
2
|
+
import { createDateKind } from './kind.mjs';
|
|
3
|
+
import { makeSafeTimestamp } from './makeSafeTimestamp.mjs';
|
|
4
|
+
import { serialize } from './serialize.mjs';
|
|
5
|
+
|
|
6
|
+
const defaultKindValue = {};
|
|
7
|
+
/**
|
|
8
|
+
* {@include date/theDate/index.md}
|
|
9
|
+
*/
|
|
10
|
+
class TheDate extends kindHeritage("the-date", createDateKind("the-date"), Date) {
|
|
11
|
+
constructor(timestamp) {
|
|
12
|
+
super(defaultKindValue, [timestamp]);
|
|
13
|
+
}
|
|
14
|
+
toNative() {
|
|
15
|
+
return new Date(this.getTime());
|
|
16
|
+
}
|
|
17
|
+
toString() {
|
|
18
|
+
return serialize(this);
|
|
19
|
+
}
|
|
20
|
+
toJSON() {
|
|
21
|
+
return serialize(this);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated this method does not work on ImmutableDate
|
|
25
|
+
*/
|
|
26
|
+
setDate(_date) {
|
|
27
|
+
return this.getTime();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated this method does not work on ImmutableDate
|
|
31
|
+
*/
|
|
32
|
+
setFullYear(_year, _month, _date) {
|
|
33
|
+
return this.getTime();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated this method does not work on ImmutableDate
|
|
37
|
+
*/
|
|
38
|
+
setHours(_hours, _min, _sec, _ms) {
|
|
39
|
+
return this.getTime();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated this method does not work on ImmutableDate
|
|
43
|
+
*/
|
|
44
|
+
setMilliseconds(_ms) {
|
|
45
|
+
return this.getTime();
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated this method does not work on ImmutableDate
|
|
49
|
+
*/
|
|
50
|
+
setMinutes(_min, _sec, _ms) {
|
|
51
|
+
return this.getTime();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated this method does not work on ImmutableDate
|
|
55
|
+
*/
|
|
56
|
+
setMonth(_month, _date) {
|
|
57
|
+
return this.getTime();
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated this method does not work on ImmutableDate
|
|
61
|
+
*/
|
|
62
|
+
setSeconds(_sec, _ms) {
|
|
63
|
+
return this.getTime();
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated this method does not work on ImmutableDate
|
|
67
|
+
*/
|
|
68
|
+
setTime(_time) {
|
|
69
|
+
return this.getTime();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated this method does not work on ImmutableDate
|
|
73
|
+
*/
|
|
74
|
+
setUTCDate(_date) {
|
|
75
|
+
return this.getTime();
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated this method does not work on ImmutableDate
|
|
79
|
+
*/
|
|
80
|
+
setUTCFullYear(_year, _month, _date) {
|
|
81
|
+
return this.getTime();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated this method does not work on ImmutableDate
|
|
85
|
+
*/
|
|
86
|
+
setUTCHours(_hours, _min, _sec, _ms) {
|
|
87
|
+
return this.getTime();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated this method does not work on ImmutableDate
|
|
91
|
+
*/
|
|
92
|
+
setUTCMilliseconds(_ms) {
|
|
93
|
+
return this.getTime();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated this method does not work on ImmutableDate
|
|
97
|
+
*/
|
|
98
|
+
setUTCMinutes(_min, _sec, _ms) {
|
|
99
|
+
return this.getTime();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated this method does not work on ImmutableDate
|
|
103
|
+
*/
|
|
104
|
+
setUTCMonth(_month, _date) {
|
|
105
|
+
return this.getTime();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated this method does not work on ImmutableDate
|
|
109
|
+
*/
|
|
110
|
+
setUTCSeconds(_sec, _ms) {
|
|
111
|
+
return this.getTime();
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
* @deprecated use DDate.create | DDate.createOrThrow function
|
|
116
|
+
*/
|
|
117
|
+
static "new"(timestamp) {
|
|
118
|
+
return new TheDate(makeSafeTimestamp(timestamp));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { TheDate };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var kind = require('../common/kind.cjs');
|
|
4
|
+
var kind$1 = require('./kind.cjs');
|
|
5
|
+
var makeSafeTimeValue = require('./makeSafeTimeValue.cjs');
|
|
6
|
+
var serialize = require('./serialize.cjs');
|
|
7
|
+
|
|
8
|
+
const defaultKindValue = {};
|
|
9
|
+
/**
|
|
10
|
+
* {@include date/theTime/index.md}
|
|
11
|
+
*/
|
|
12
|
+
class TheTime extends kind.kindHeritage("the-time", kind$1.createDateKind("the-time")) {
|
|
13
|
+
timeValue;
|
|
14
|
+
constructor(timeValue) {
|
|
15
|
+
super(defaultKindValue);
|
|
16
|
+
this.timeValue = timeValue;
|
|
17
|
+
}
|
|
18
|
+
toNative() {
|
|
19
|
+
return this.timeValue;
|
|
20
|
+
}
|
|
21
|
+
toString() {
|
|
22
|
+
return serialize.serialize(this);
|
|
23
|
+
}
|
|
24
|
+
toJSON() {
|
|
25
|
+
return serialize.serialize(this);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
* @deprecated use DDate.createTime | DDate.createTimeOrThrow function
|
|
30
|
+
*/
|
|
31
|
+
static "new"(time) {
|
|
32
|
+
return new TheTime(makeSafeTimeValue.makeSafeTimeValue(time));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
exports.TheTime = TheTime;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type SerializedTheTime } from "./types";
|
|
2
|
+
declare const TheTime_base: new (params?: {
|
|
3
|
+
"@DuplojsUtilsDate/the-time"?: unknown;
|
|
4
|
+
} | undefined) => import("../common/kind").Kind<import("../common/kind").KindDefinition<"the-time", unknown>, unknown> & import("../common/kind").Kind<import("../common/kind").KindDefinition<"@DuplojsUtilsDate/the-time", unknown>, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* Represents an immutable time value object (`TheTime`) stored in milliseconds.
|
|
7
|
+
*
|
|
8
|
+
* Signature: `TheTime` → immutable class-like value object
|
|
9
|
+
*
|
|
10
|
+
* `TheTime` solves unit-fragmentation issues (`hours`, `minutes`, `seconds`) by using a single safe millisecond representation while keeping strong typing and explicit serialization.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* const theTime = D.createTime(2, "hour");
|
|
14
|
+
* // theTime: TheTime
|
|
15
|
+
*
|
|
16
|
+
* const timeValue = theTime.toNative();
|
|
17
|
+
* // timeValue: number
|
|
18
|
+
*
|
|
19
|
+
* const serialized = D.serialize(theTime);
|
|
20
|
+
* // serialized: SerializedTheTime
|
|
21
|
+
*
|
|
22
|
+
* const date = D.create("2025-10-20");
|
|
23
|
+
* const dateWithDuration = D.addTime(date, theTime);
|
|
24
|
+
* // dateWithDuration: TheDate
|
|
25
|
+
*
|
|
26
|
+
* const threeHours = D.createTime(3, "hour");
|
|
27
|
+
* // threeHours: TheTime
|
|
28
|
+
*
|
|
29
|
+
* const asMilliseconds = D.toTimeValue(theTime);
|
|
30
|
+
* // asMilliseconds: number
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* - `TheTime` is not a `number`, but it behaves as an immutable numeric time value.
|
|
35
|
+
* - Date unit operators (`addMinutes`, `subtractDays`, etc.) target `TheDate`; `TheTime` is used as a normalized duration value.
|
|
36
|
+
* - Use `D.serialize(theTime)` to convert to `SerializedTheTime`.
|
|
37
|
+
* - Use `D.createTime(...)` / `D.createTimeOrThrow(...)` to construct instances.
|
|
38
|
+
*
|
|
39
|
+
* @see https://utils.duplojs.dev/en/v1/api/date/theTime
|
|
40
|
+
* @see https://utils.duplojs.dev/en/v1/api/date/serialize
|
|
41
|
+
* @see https://utils.duplojs.dev/en/v1/api/date/createTime
|
|
42
|
+
*
|
|
43
|
+
* @namespace D
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
export declare class TheTime extends TheTime_base {
|
|
47
|
+
private timeValue;
|
|
48
|
+
private constructor();
|
|
49
|
+
toNative(): number;
|
|
50
|
+
toString(): SerializedTheTime;
|
|
51
|
+
toJSON(): SerializedTheTime;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { kindHeritage } from '../common/kind.mjs';
|
|
2
|
+
import { createDateKind } from './kind.mjs';
|
|
3
|
+
import { makeSafeTimeValue } from './makeSafeTimeValue.mjs';
|
|
4
|
+
import { serialize } from './serialize.mjs';
|
|
5
|
+
|
|
6
|
+
const defaultKindValue = {};
|
|
7
|
+
/**
|
|
8
|
+
* {@include date/theTime/index.md}
|
|
9
|
+
*/
|
|
10
|
+
class TheTime extends kindHeritage("the-time", createDateKind("the-time")) {
|
|
11
|
+
timeValue;
|
|
12
|
+
constructor(timeValue) {
|
|
13
|
+
super(defaultKindValue);
|
|
14
|
+
this.timeValue = timeValue;
|
|
15
|
+
}
|
|
16
|
+
toNative() {
|
|
17
|
+
return this.timeValue;
|
|
18
|
+
}
|
|
19
|
+
toString() {
|
|
20
|
+
return serialize(this);
|
|
21
|
+
}
|
|
22
|
+
toJSON() {
|
|
23
|
+
return serialize(this);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* @deprecated use DDate.createTime | DDate.createTimeOrThrow function
|
|
28
|
+
*/
|
|
29
|
+
static "new"(time) {
|
|
30
|
+
return new TheTime(makeSafeTimeValue(time));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { TheTime };
|
package/dist/date/timezone.cjs
CHANGED
package/dist/date/timezone.d.ts
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
import { type GetEnumValue } from "../common/enum";
|
|
2
|
+
/**
|
|
3
|
+
* Provides the list of supported IANA timezone identifiers.
|
|
4
|
+
*
|
|
5
|
+
* Signature: `timezone` → enum-like constant, `Timezone` → associated union type
|
|
6
|
+
*
|
|
7
|
+
* Use these values with timezone-aware date functions (`getYear`, `format`, `applyTimezone`, etc.).
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* const input = D.create("2024-06-20", {
|
|
11
|
+
* hour: "12",
|
|
12
|
+
* });
|
|
13
|
+
*
|
|
14
|
+
* const ParisTimezone = D.timezone["Europe/Paris"];
|
|
15
|
+
* // Timezone: "Europe/Paris"
|
|
16
|
+
*
|
|
17
|
+
* const offset = D.getTimezoneOffset(input, "America/New_York");
|
|
18
|
+
* // offset: number
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* - Values follow the IANA timezone database naming.
|
|
23
|
+
*
|
|
24
|
+
* @see https://utils.duplojs.dev/en/v1/api/date/getTimezoneOffset
|
|
25
|
+
*
|
|
26
|
+
* @namespace D
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
2
29
|
export declare const timezone: {
|
|
3
30
|
"Africa/Abidjan": "Africa/Abidjan";
|
|
4
31
|
"Africa/Accra": "Africa/Accra";
|
package/dist/date/timezone.mjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var theDate = require('./theDate.cjs');
|
|
3
4
|
var toNative = require('./toNative.cjs');
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* {@include date/toISOString/index.md}
|
|
7
8
|
*/
|
|
8
9
|
function toISOString(input) {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
if (input instanceof theDate.TheDate) {
|
|
11
|
+
return input.toISOString();
|
|
12
|
+
}
|
|
13
|
+
return toNative.toNative(input).toISOString();
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
exports.toISOString = toISOString;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TheDate } from "./theDate";
|
|
2
|
+
import type { SerializedTheDate } from "./types";
|
|
2
3
|
/**
|
|
3
|
-
* Converts a date to
|
|
4
|
+
* Converts a date value to ISO-8601 string.
|
|
4
5
|
*
|
|
5
|
-
* Signature: `toISOString(input)` →
|
|
6
|
+
* Signature: `toISOString(input)` → `string`
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
+
* `input` accepts `TheDate` or `SerializedTheDate`.
|
|
8
9
|
*
|
|
9
10
|
* ```ts
|
|
10
|
-
* const input = D.create("
|
|
11
|
-
* const
|
|
12
|
-
* //
|
|
11
|
+
* const input = D.create("2024-06-20");
|
|
12
|
+
* const iso = D.toISOString(input);
|
|
13
|
+
* // iso: string
|
|
14
|
+
*
|
|
15
|
+
* const iso2 = D.toISOString("date1718841600000+");
|
|
16
|
+
* // iso2: string
|
|
13
17
|
*
|
|
14
18
|
* pipe(
|
|
15
19
|
* input,
|
|
16
20
|
* D.toISOString,
|
|
17
|
-
* ); // result: "2023-11-14T00:00:00.000Z"
|
|
18
|
-
*
|
|
19
21
|
* ```
|
|
20
22
|
*
|
|
21
23
|
* @see https://utils.duplojs.dev/en/v1/api/date/toISOString
|
|
@@ -23,4 +25,4 @@ import type { TheDate } from "./types";
|
|
|
23
25
|
* @namespace D
|
|
24
26
|
*
|
|
25
27
|
*/
|
|
26
|
-
export declare function toISOString<GenericInput extends TheDate>(input: GenericInput): string;
|
|
28
|
+
export declare function toISOString<GenericInput extends TheDate | SerializedTheDate>(input: GenericInput): string;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { TheDate } from './theDate.mjs';
|
|
1
2
|
import { toNative } from './toNative.mjs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* {@include date/toISOString/index.md}
|
|
5
6
|
*/
|
|
6
7
|
function toISOString(input) {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
if (input instanceof TheDate) {
|
|
9
|
+
return input.toISOString();
|
|
10
|
+
}
|
|
11
|
+
return toNative(input).toISOString();
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
export { toISOString };
|
package/dist/date/toNative.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var theDate = require('./theDate.cjs');
|
|
3
4
|
var toTimestamp = require('./toTimestamp.cjs');
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* {@include date/toNative/index.md}
|
|
7
8
|
*/
|
|
8
9
|
function toNative(input) {
|
|
10
|
+
if (input instanceof theDate.TheDate) {
|
|
11
|
+
return input.toNative();
|
|
12
|
+
}
|
|
9
13
|
const timestamp = toTimestamp.toTimestamp(input);
|
|
10
14
|
return new Date(timestamp);
|
|
11
15
|
}
|
package/dist/date/toNative.d.ts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TheDate } from "./theDate";
|
|
2
|
+
import type { SerializedTheDate } from "./types";
|
|
2
3
|
/**
|
|
3
|
-
* Converts a
|
|
4
|
+
* Converts a date value to native JavaScript `Date`.
|
|
4
5
|
*
|
|
5
|
-
* Signature: `toNative(input)` →
|
|
6
|
+
* Signature: `toNative(input)` → `Date`
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
+
* `input` accepts `TheDate` or `SerializedTheDate`.
|
|
8
9
|
*
|
|
9
10
|
* ```ts
|
|
10
|
-
* const input = D.create("
|
|
11
|
-
* const
|
|
12
|
-
* //
|
|
11
|
+
* const input = D.create("2024-06-20");
|
|
12
|
+
* const nativeDate = D.toNative(input);
|
|
13
|
+
* // nativeDate: Date
|
|
14
|
+
*
|
|
15
|
+
* const nativeDate2 = D.toNative("date1718841600000+");
|
|
16
|
+
* // nativeDate2: Date
|
|
13
17
|
*
|
|
14
18
|
* pipe(
|
|
15
19
|
* input,
|
|
16
20
|
* D.toNative,
|
|
17
|
-
* ); // result: Date { time: 1699920000000 }
|
|
18
|
-
*
|
|
19
21
|
* ```
|
|
20
22
|
*
|
|
21
23
|
* @see https://utils.duplojs.dev/en/v1/api/date/toNative
|
|
@@ -23,4 +25,4 @@ import type { TheDate } from "./types";
|
|
|
23
25
|
* @namespace D
|
|
24
26
|
*
|
|
25
27
|
*/
|
|
26
|
-
export declare function toNative<GenericInput extends TheDate>(input: GenericInput): Date;
|
|
28
|
+
export declare function toNative<GenericInput extends TheDate | SerializedTheDate>(input: GenericInput): Date;
|
package/dist/date/toNative.mjs
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { TheDate } from './theDate.mjs';
|
|
1
2
|
import { toTimestamp } from './toTimestamp.mjs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* {@include date/toNative/index.md}
|
|
5
6
|
*/
|
|
6
7
|
function toNative(input) {
|
|
8
|
+
if (input instanceof TheDate) {
|
|
9
|
+
return input.toNative();
|
|
10
|
+
}
|
|
7
11
|
const timestamp = toTimestamp(input);
|
|
8
12
|
return new Date(timestamp);
|
|
9
13
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var constants = require('./constants.cjs');
|
|
4
3
|
var makeSafeTimeValue = require('./makeSafeTimeValue.cjs');
|
|
4
|
+
var theTime = require('./theTime.cjs');
|
|
5
|
+
var constants = require('./constants.cjs');
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* {@include date/toTimeValue/index.md}
|
|
8
9
|
*/
|
|
9
10
|
function toTimeValue(input) {
|
|
10
|
-
|
|
11
|
+
if (input instanceof theTime.TheTime) {
|
|
12
|
+
return input.toNative();
|
|
13
|
+
}
|
|
14
|
+
const match = input.match(constants.serializeTheTimeRegex);
|
|
11
15
|
const { value, sign } = match.groups;
|
|
12
16
|
return makeSafeTimeValue.makeSafeTimeValue(Number(sign === "-"
|
|
13
17
|
? `-${value}`
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TheTime } from "./theTime";
|
|
2
|
+
import type { SerializedTheTime } from "./types";
|
|
2
3
|
/**
|
|
3
|
-
* Converts a
|
|
4
|
+
* Converts a duration value to a numeric millisecond time value.
|
|
4
5
|
*
|
|
5
|
-
* Signature: `toTimeValue(input)` →
|
|
6
|
+
* Signature: `toTimeValue(input)` → `number`
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
+
* `input` accepts `TheTime` or `SerializedTheTime`.
|
|
8
9
|
*
|
|
9
10
|
* ```ts
|
|
10
|
-
* const input = D.
|
|
11
|
-
* const
|
|
12
|
-
* //
|
|
11
|
+
* const input = D.createTime(90_000, "millisecond");
|
|
12
|
+
* const value = D.toTimeValue(input);
|
|
13
|
+
* // value: number
|
|
13
14
|
*
|
|
14
|
-
* const
|
|
15
|
-
* //
|
|
15
|
+
* const value2 = D.toTimeValue("time3600000-");
|
|
16
|
+
* // value2: number
|
|
16
17
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
18
|
+
* pipe(
|
|
19
|
+
* input,
|
|
20
|
+
* D.toTimeValue,
|
|
19
21
|
* ```
|
|
20
22
|
*
|
|
21
23
|
* @see https://utils.duplojs.dev/en/v1/api/date/toTimeValue
|
|
@@ -23,4 +25,4 @@ import { type TheTime } from "./types";
|
|
|
23
25
|
* @namespace D
|
|
24
26
|
*
|
|
25
27
|
*/
|
|
26
|
-
export declare function toTimeValue<GenericInput extends TheTime>(input: GenericInput): number;
|
|
28
|
+
export declare function toTimeValue<GenericInput extends TheTime | SerializedTheTime>(input: GenericInput): number;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { theTimeRegex } from './constants.mjs';
|
|
2
1
|
import { makeSafeTimeValue } from './makeSafeTimeValue.mjs';
|
|
2
|
+
import { TheTime } from './theTime.mjs';
|
|
3
|
+
import { serializeTheTimeRegex } from './constants.mjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* {@include date/toTimeValue/index.md}
|
|
6
7
|
*/
|
|
7
8
|
function toTimeValue(input) {
|
|
8
|
-
|
|
9
|
+
if (input instanceof TheTime) {
|
|
10
|
+
return input.toNative();
|
|
11
|
+
}
|
|
12
|
+
const match = input.match(serializeTheTimeRegex);
|
|
9
13
|
const { value, sign } = match.groups;
|
|
10
14
|
return makeSafeTimeValue(Number(sign === "-"
|
|
11
15
|
? `-${value}`
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var constants = require('./constants.cjs');
|
|
4
4
|
var makeSafeTimestamp = require('./makeSafeTimestamp.cjs');
|
|
5
|
+
var theDate = require('./theDate.cjs');
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* {@include date/toTimestamp/index.md}
|
|
8
9
|
*/
|
|
9
10
|
function toTimestamp(input) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
if (input instanceof theDate.TheDate) {
|
|
12
|
+
return input.getTime();
|
|
13
|
+
}
|
|
14
|
+
const match = input.match(constants.serializeTheDateRegex);
|
|
13
15
|
const { value, sign } = match.groups;
|
|
14
16
|
return makeSafeTimestamp.makeSafeTimestamp(Number(sign === "-"
|
|
15
17
|
? `-${value}`
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TheDate } from "./theDate";
|
|
2
|
+
import type { SerializedTheDate } from "./types";
|
|
2
3
|
/**
|
|
3
|
-
* Converts a
|
|
4
|
+
* Converts a date value to UTC timestamp (milliseconds).
|
|
4
5
|
*
|
|
5
|
-
* Signature: `toTimestamp(input)` →
|
|
6
|
+
* Signature: `toTimestamp(input)` → `number`
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
+
* `input` accepts `TheDate` or `SerializedTheDate`.
|
|
8
9
|
*
|
|
9
10
|
* ```ts
|
|
10
11
|
* const input = D.create("2024-06-20");
|
|
11
|
-
* const
|
|
12
|
-
* //
|
|
12
|
+
* const timestamp = D.toTimestamp(input);
|
|
13
|
+
* // timestamp: number
|
|
14
|
+
*
|
|
15
|
+
* const timestamp2 = D.toTimestamp("date1718841600000+");
|
|
16
|
+
* // timestamp2: number
|
|
13
17
|
*
|
|
14
18
|
* pipe(
|
|
15
19
|
* input,
|
|
16
20
|
* D.toTimestamp,
|
|
17
|
-
* ); // result: 1718841600000
|
|
18
|
-
*
|
|
19
21
|
* ```
|
|
20
22
|
*
|
|
21
23
|
* @see https://utils.duplojs.dev/en/v1/api/date/toTimestamp
|
|
@@ -23,4 +25,4 @@ import type { TheDate } from "./types";
|
|
|
23
25
|
* @namespace D
|
|
24
26
|
*
|
|
25
27
|
*/
|
|
26
|
-
export declare function toTimestamp<GenericInput extends TheDate>(input: GenericInput): number;
|
|
28
|
+
export declare function toTimestamp<GenericInput extends TheDate | SerializedTheDate>(input: GenericInput): number;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { serializeTheDateRegex } from './constants.mjs';
|
|
2
2
|
import { makeSafeTimestamp } from './makeSafeTimestamp.mjs';
|
|
3
|
+
import { TheDate } from './theDate.mjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* {@include date/toTimestamp/index.md}
|
|
6
7
|
*/
|
|
7
8
|
function toTimestamp(input) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
if (input instanceof TheDate) {
|
|
10
|
+
return input.getTime();
|
|
11
|
+
}
|
|
12
|
+
const match = input.match(serializeTheDateRegex);
|
|
11
13
|
const { value, sign } = match.groups;
|
|
12
14
|
return makeSafeTimestamp(Number(sign === "-"
|
|
13
15
|
? `-${value}`
|
package/dist/date/today.cjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var theDate = require('./theDate.cjs');
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* {@include date/today/index.md}
|
|
5
7
|
*/
|
|
6
8
|
function today() {
|
|
7
9
|
const timestamp = new Date().setUTCHours(0, 0, 0, 0);
|
|
8
|
-
return
|
|
10
|
+
return theDate.TheDate.new(timestamp);
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
exports.today = today;
|
package/dist/date/today.d.ts
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
|
+
import { TheDate } from "./theDate";
|
|
1
2
|
/**
|
|
2
|
-
* Returns
|
|
3
|
+
* Returns current day at UTC midnight as `TheDate`.
|
|
3
4
|
*
|
|
4
|
-
* Signature: `today()` →
|
|
5
|
-
*
|
|
6
|
-
* The input value is not mutated.
|
|
5
|
+
* Signature: `today()` → `TheDate`
|
|
7
6
|
*
|
|
8
7
|
* ```ts
|
|
9
|
-
* const
|
|
10
|
-
* //
|
|
8
|
+
* const value = D.today();
|
|
9
|
+
* // value: TheDate
|
|
10
|
+
*
|
|
11
|
+
* const hour = D.getHour(value);
|
|
12
|
+
* // hour: 0
|
|
11
13
|
*
|
|
14
|
+
* const serialized = D.serialize(value);
|
|
15
|
+
* // serialized: SerializedTheDate
|
|
12
16
|
* ```
|
|
13
17
|
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* - Time part is normalized to `00:00:00.000` UTC.
|
|
20
|
+
*
|
|
14
21
|
* @see https://utils.duplojs.dev/en/v1/api/date/today
|
|
15
22
|
*
|
|
16
23
|
* @namespace D
|
|
17
24
|
*
|
|
18
25
|
*/
|
|
19
|
-
export declare function today():
|
|
26
|
+
export declare function today(): TheDate;
|
package/dist/date/today.mjs
CHANGED