@powerlines/plugin-date 0.12.67 → 0.12.68
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/_virtual/rolldown_runtime.cjs +1 -0
- package/dist/{chunk-BGGBqwuQ.mjs → _virtual/rolldown_runtime.mjs} +1 -1
- package/dist/alloy/src/core/components/output.cjs +1 -0
- package/dist/alloy/src/core/components/output.mjs +1 -0
- package/dist/alloy/src/core/components/single-line-comment.cjs +1 -0
- package/dist/alloy/src/core/components/single-line-comment.mjs +1 -0
- package/dist/alloy/src/core/components/source-file.cjs +1 -0
- package/dist/alloy/src/core/components/source-file.mjs +1 -0
- package/dist/alloy/src/core/contexts/context.cjs +1 -0
- package/dist/alloy/src/core/contexts/context.mjs +1 -0
- package/dist/alloy/src/core/contexts/reflection.cjs +1 -0
- package/dist/alloy/src/core/contexts/reflection.mjs +1 -0
- package/dist/alloy/src/create-plugin.cjs +2 -0
- package/dist/alloy/src/create-plugin.mjs +2 -0
- package/dist/alloy/src/helpers/refkey.cjs +1 -0
- package/dist/alloy/src/helpers/refkey.mjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-file.cjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-file.mjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-table.cjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-table.mjs +1 -0
- package/dist/alloy/src/markdown/contexts/markdown-table.cjs +1 -0
- package/dist/alloy/src/markdown/contexts/markdown-table.mjs +1 -0
- package/dist/alloy/src/typescript/components/builtin-file.cjs +1 -0
- package/dist/alloy/src/typescript/components/builtin-file.mjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc-reflection.cjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc-reflection.mjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc.cjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc.mjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-file.cjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-file.mjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-interface.cjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-interface.mjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-object.cjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-object.mjs +1 -0
- package/dist/components/date-fns.cjs +513 -0
- package/dist/components/date-fns.d.cts +13 -0
- package/dist/components/date-fns.d.mts +13 -0
- package/dist/components/date-fns.mjs +513 -0
- package/dist/components/dayjs.cjs +458 -0
- package/dist/components/dayjs.d.cts +13 -0
- package/dist/components/dayjs.d.mts +13 -0
- package/dist/components/dayjs.mjs +458 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.mts +4 -0
- package/dist/components/index.mjs +1 -0
- package/dist/components/luxon.cjs +462 -0
- package/dist/components/luxon.d.cts +13 -0
- package/dist/components/luxon.d.mts +13 -0
- package/dist/components/luxon.mjs +462 -0
- package/dist/components/moment.cjs +448 -0
- package/dist/components/moment.d.cts +13 -0
- package/dist/components/moment.d.mts +13 -0
- package/dist/components/moment.mjs +448 -0
- package/dist/deepkit/schemas/reflection.cjs +1 -0
- package/dist/deepkit/schemas/reflection.d.cts +1560 -0
- package/dist/deepkit/schemas/reflection.d.mts +1560 -0
- package/dist/deepkit/schemas/reflection.mjs +1 -0
- package/dist/deepkit/schemas/reflection2.cjs +1 -0
- package/dist/deepkit/schemas/reflection2.mjs +1 -0
- package/dist/deepkit/src/capnp.cjs +1 -0
- package/dist/deepkit/src/capnp.mjs +1 -0
- package/dist/deepkit/src/reflect-type.cjs +1 -0
- package/dist/deepkit/src/reflect-type.mjs +1 -0
- package/dist/deepkit/src/resolve-reflections.cjs +1 -0
- package/dist/deepkit/src/resolve-reflections.mjs +1 -0
- package/dist/deepkit/src/types.d.cts +10 -0
- package/dist/deepkit/src/types.d.mts +10 -0
- package/dist/deepkit/src/utilities.cjs +1 -0
- package/dist/deepkit/src/utilities.mjs +1 -0
- package/dist/deepkit/src/vendor/type.cjs +1 -0
- package/dist/deepkit/src/vendor/type.d.cts +7 -0
- package/dist/deepkit/src/vendor/type.d.mts +7 -0
- package/dist/deepkit/src/vendor/type.mjs +1 -0
- package/dist/index.cjs +1 -1953
- package/dist/index.d.cts +7 -40
- package/dist/index.d.mts +9 -40
- package/dist/index.mjs +1 -1950
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +1 -0
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +1 -0
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +1 -0
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +1 -0
- package/dist/plugin-babel/src/helpers/filters.cjs +1 -0
- package/dist/plugin-babel/src/helpers/filters.mjs +1 -0
- package/dist/plugin-babel/src/helpers/index.cjs +1 -0
- package/dist/plugin-babel/src/helpers/index.mjs +1 -0
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +1 -0
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +1 -0
- package/dist/plugin-babel/src/helpers/options.cjs +1 -0
- package/dist/plugin-babel/src/helpers/options.mjs +1 -0
- package/dist/plugin-babel/src/index.cjs +1 -0
- package/dist/plugin-babel/src/index.mjs +1 -0
- package/dist/plugin-babel/src/types/index.d.mts +1 -0
- package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
- package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
- package/dist/plugin-env/src/babel/index.cjs +1 -0
- package/dist/plugin-env/src/babel/index.mjs +1 -0
- package/dist/plugin-env/src/babel/plugin.cjs +5 -0
- package/dist/plugin-env/src/babel/plugin.mjs +5 -0
- package/dist/plugin-env/src/components/docs.cjs +1 -0
- package/dist/plugin-env/src/components/docs.mjs +1 -0
- package/dist/plugin-env/src/components/env.cjs +34 -0
- package/dist/plugin-env/src/components/env.mjs +31 -0
- package/dist/plugin-env/src/components/index.cjs +1 -0
- package/dist/plugin-env/src/components/index.mjs +1 -0
- package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +1 -0
- package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +1 -0
- package/dist/plugin-env/src/helpers/index.cjs +1 -0
- package/dist/plugin-env/src/helpers/index.mjs +1 -0
- package/dist/plugin-env/src/helpers/load.cjs +1 -0
- package/dist/plugin-env/src/helpers/load.mjs +1 -0
- package/dist/plugin-env/src/helpers/persistence.cjs +1 -0
- package/dist/plugin-env/src/helpers/persistence.mjs +1 -0
- package/dist/plugin-env/src/helpers/reflect.cjs +1 -0
- package/dist/plugin-env/src/helpers/reflect.mjs +1 -0
- package/dist/plugin-env/src/helpers/source-file-env.cjs +1 -0
- package/dist/plugin-env/src/helpers/source-file-env.mjs +1 -0
- package/dist/plugin-env/src/helpers/template-helpers.cjs +1 -0
- package/dist/plugin-env/src/helpers/template-helpers.mjs +1 -0
- package/dist/plugin-env/src/index.cjs +16 -0
- package/dist/plugin-env/src/index.mjs +16 -0
- package/dist/plugin-env/src/types/plugin.d.cts +135 -0
- package/dist/plugin-env/src/types/plugin.d.mts +136 -0
- package/dist/plugin-env/src/types/runtime.d.cts +792 -0
- package/dist/plugin-env/src/types/runtime.d.mts +792 -0
- package/dist/powerlines/src/lib/build/esbuild.cjs +14 -0
- package/dist/powerlines/src/lib/build/esbuild.mjs +14 -0
- package/dist/powerlines/src/lib/entry.cjs +1 -0
- package/dist/powerlines/src/lib/entry.mjs +1 -0
- package/dist/powerlines/src/lib/logger.cjs +1 -0
- package/dist/powerlines/src/lib/logger.mjs +1 -0
- package/dist/powerlines/src/lib/utilities/bundle.cjs +1 -0
- package/dist/powerlines/src/lib/utilities/bundle.mjs +1 -0
- package/dist/powerlines/src/lib/utilities/file-header.cjs +10 -0
- package/dist/powerlines/src/lib/utilities/file-header.mjs +10 -0
- package/dist/powerlines/src/lib/utilities/resolve.cjs +1 -0
- package/dist/powerlines/src/lib/utilities/resolve.mjs +1 -0
- package/dist/powerlines/src/plugin-utils/helpers.cjs +1 -0
- package/dist/powerlines/src/plugin-utils/helpers.mjs +1 -0
- package/dist/powerlines/src/plugin-utils/paths.cjs +1 -0
- package/dist/powerlines/src/plugin-utils/paths.mjs +1 -0
- package/dist/powerlines/src/types/babel.d.cts +22 -0
- package/dist/powerlines/src/types/babel.d.mts +22 -0
- package/dist/powerlines/src/types/build.d.cts +139 -0
- package/dist/powerlines/src/types/build.d.mts +139 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +9 -0
- package/dist/powerlines/src/types/config.d.cts +356 -0
- package/dist/powerlines/src/types/config.d.mts +357 -0
- package/dist/powerlines/src/types/context.d.cts +358 -0
- package/dist/powerlines/src/types/context.d.mts +360 -0
- package/dist/powerlines/src/types/fs.d.cts +458 -0
- package/dist/powerlines/src/types/fs.d.mts +458 -0
- package/dist/powerlines/src/types/hooks.d.mts +2 -0
- package/dist/powerlines/src/types/plugin.d.cts +232 -0
- package/dist/powerlines/src/types/plugin.d.mts +232 -0
- package/dist/powerlines/src/types/resolved.d.cts +82 -0
- package/dist/powerlines/src/types/resolved.d.mts +82 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/types/index.cjs +0 -1
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +42 -1
- package/dist/types/plugin.d.mts +42 -1
- package/dist/types/plugin.mjs +1 -1
- package/dist/types/runtime.cjs +0 -1
- package/dist/types/runtime.d.cts +710 -1
- package/dist/types/runtime.d.mts +710 -1
- package/dist/types/runtime.mjs +1 -1
- package/package.json +7 -7
- package/dist/index-CmCelmEL.d.cts +0 -1
- package/dist/index-ColiPbLk.d.mts +0 -1
- package/dist/plugin-D3G0L2i6.d.mts +0 -4208
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-DNkZTQrj.d.cts +0 -4209
- package/dist/plugin-alze5tBm.mjs +0 -1
- package/dist/runtime-0ZpEtv0G.mjs +0 -1
- package/dist/runtime-B8LVkjWB.d.cts +0 -711
- package/dist/runtime-D4zTdSwv.cjs +0 -0
- package/dist/runtime-DPe0V01H.d.mts +0 -711
- package/dist/types-CBTc19th.cjs +0 -0
- package/dist/types-CZFQnkin.mjs +0 -1
package/dist/plugin-alze5tBm.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
@@ -1,711 +0,0 @@
|
|
|
1
|
-
//#region src/types/runtime.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The various types of date formats used in Storm Stack applications.
|
|
4
|
-
*/
|
|
5
|
-
interface DateFormats<TFormatToken = string> {
|
|
6
|
-
/**
|
|
7
|
-
* Localized full date
|
|
8
|
-
*
|
|
9
|
-
* @example "Jan 1, 2019"
|
|
10
|
-
*/
|
|
11
|
-
fullDate: TFormatToken;
|
|
12
|
-
/**
|
|
13
|
-
* Partially localized full date with weekday, useful for text-to-speech accessibility
|
|
14
|
-
*
|
|
15
|
-
* @example "Tuesday, January 1, 2019"
|
|
16
|
-
*/
|
|
17
|
-
fullDateWithWeekday: TFormatToken;
|
|
18
|
-
/**
|
|
19
|
-
* Date format string with month and day of month
|
|
20
|
-
*
|
|
21
|
-
* @example "1 January"
|
|
22
|
-
*/
|
|
23
|
-
normalDate: TFormatToken;
|
|
24
|
-
/**
|
|
25
|
-
* Date format string with weekday, month and day of month
|
|
26
|
-
*
|
|
27
|
-
* @example "Wed, Jan 1"
|
|
28
|
-
*/
|
|
29
|
-
normalDateWithWeekday: TFormatToken;
|
|
30
|
-
/**
|
|
31
|
-
* Shorter day format
|
|
32
|
-
*
|
|
33
|
-
* @example "Jan 1"
|
|
34
|
-
*/
|
|
35
|
-
shortDate: TFormatToken;
|
|
36
|
-
/**
|
|
37
|
-
* Year format string
|
|
38
|
-
*
|
|
39
|
-
* @example "2019"
|
|
40
|
-
*/
|
|
41
|
-
year: TFormatToken;
|
|
42
|
-
/**
|
|
43
|
-
* Month format string
|
|
44
|
-
*
|
|
45
|
-
* @example "January"
|
|
46
|
-
*/
|
|
47
|
-
month: TFormatToken;
|
|
48
|
-
/**
|
|
49
|
-
* Short month format string
|
|
50
|
-
*
|
|
51
|
-
* @example "Jan"
|
|
52
|
-
*/
|
|
53
|
-
monthShort: TFormatToken;
|
|
54
|
-
/**
|
|
55
|
-
* Month with year format string
|
|
56
|
-
*
|
|
57
|
-
* @example "January 2018"
|
|
58
|
-
*/
|
|
59
|
-
monthAndYear: TFormatToken;
|
|
60
|
-
/**
|
|
61
|
-
* Month with date format string
|
|
62
|
-
*
|
|
63
|
-
* @example "January 1"
|
|
64
|
-
*/
|
|
65
|
-
monthAndDate: TFormatToken;
|
|
66
|
-
/**
|
|
67
|
-
* Weekday format string
|
|
68
|
-
*
|
|
69
|
-
* @example "Wednesday"
|
|
70
|
-
*/
|
|
71
|
-
weekday: TFormatToken;
|
|
72
|
-
/**
|
|
73
|
-
* Short weekday format string
|
|
74
|
-
*
|
|
75
|
-
* @example "Wed"
|
|
76
|
-
*/
|
|
77
|
-
weekdayShort: TFormatToken;
|
|
78
|
-
/**
|
|
79
|
-
* Day format string
|
|
80
|
-
*
|
|
81
|
-
* @example "1"
|
|
82
|
-
*/
|
|
83
|
-
dayOfMonth: TFormatToken;
|
|
84
|
-
/**
|
|
85
|
-
* Hours format string
|
|
86
|
-
*
|
|
87
|
-
* @example "11"
|
|
88
|
-
*/
|
|
89
|
-
hours12h: TFormatToken;
|
|
90
|
-
/**
|
|
91
|
-
* Hours format string
|
|
92
|
-
*
|
|
93
|
-
* @example "23"
|
|
94
|
-
*/
|
|
95
|
-
hours24h: TFormatToken;
|
|
96
|
-
/**
|
|
97
|
-
* Minutes format string
|
|
98
|
-
*
|
|
99
|
-
* @example "44"
|
|
100
|
-
*/
|
|
101
|
-
minutes: TFormatToken;
|
|
102
|
-
/**
|
|
103
|
-
* Seconds format string
|
|
104
|
-
*
|
|
105
|
-
* @example "00"
|
|
106
|
-
*/
|
|
107
|
-
seconds: TFormatToken;
|
|
108
|
-
/**
|
|
109
|
-
* Full time localized format string
|
|
110
|
-
*
|
|
111
|
-
* @example "11:44 PM" for US, "23:44" for Europe
|
|
112
|
-
*/
|
|
113
|
-
fullTime: TFormatToken;
|
|
114
|
-
/**
|
|
115
|
-
* Not localized full time format string
|
|
116
|
-
*
|
|
117
|
-
* @example "11:44 PM"
|
|
118
|
-
*/
|
|
119
|
-
fullTime12h: TFormatToken;
|
|
120
|
-
/**
|
|
121
|
-
* Not localized full time format string
|
|
122
|
-
*
|
|
123
|
-
* @example "23:44"
|
|
124
|
-
*/
|
|
125
|
-
fullTime24h: TFormatToken;
|
|
126
|
-
/**
|
|
127
|
-
* Date & time format string with localized time
|
|
128
|
-
*
|
|
129
|
-
* @example "Jan 1, 2018 11:44 PM"
|
|
130
|
-
*/
|
|
131
|
-
fullDateTime: TFormatToken;
|
|
132
|
-
/**
|
|
133
|
-
* Not localized date & Time format 12h
|
|
134
|
-
*
|
|
135
|
-
* @example "Jan 1, 2018 11:44 PM"
|
|
136
|
-
*/
|
|
137
|
-
fullDateTime12h: TFormatToken;
|
|
138
|
-
/**
|
|
139
|
-
* Not localized date & Time format 24h
|
|
140
|
-
*
|
|
141
|
-
* @example "Jan 1, 2018 23:44"
|
|
142
|
-
*/
|
|
143
|
-
fullDateTime24h: TFormatToken;
|
|
144
|
-
/**
|
|
145
|
-
* Localized keyboard input friendly date format
|
|
146
|
-
*
|
|
147
|
-
* @example "02/13/2020"
|
|
148
|
-
*/
|
|
149
|
-
keyboardDate: TFormatToken;
|
|
150
|
-
/**
|
|
151
|
-
* Localized keyboard input friendly date/time format
|
|
152
|
-
*
|
|
153
|
-
* @example "02/13/2020 23:44"
|
|
154
|
-
*/
|
|
155
|
-
keyboardDateTime: TFormatToken;
|
|
156
|
-
/**
|
|
157
|
-
* Partially localized keyboard input friendly date/time 12h format
|
|
158
|
-
*
|
|
159
|
-
* @example "02/13/2020 11:44 PM"
|
|
160
|
-
*/
|
|
161
|
-
keyboardDateTime12h: TFormatToken;
|
|
162
|
-
/**
|
|
163
|
-
* Partially localized keyboard input friendly date/time 24h format
|
|
164
|
-
*
|
|
165
|
-
* @example "02/13/2020 23:44"
|
|
166
|
-
*/
|
|
167
|
-
keyboardDateTime24h: TFormatToken;
|
|
168
|
-
/**
|
|
169
|
-
* System-friendly date/time 24h format for scenarios such as traces and logging
|
|
170
|
-
*
|
|
171
|
-
* @example "02/13/2020 23:44:55.666"
|
|
172
|
-
*/
|
|
173
|
-
systemDateTime: TFormatToken;
|
|
174
|
-
/**
|
|
175
|
-
* System-friendly date/time format for scenarios such as file suffixes or URLs
|
|
176
|
-
*
|
|
177
|
-
* @example "02-13-2020_23-44-55-666"
|
|
178
|
-
*/
|
|
179
|
-
filePathDateTime: TFormatToken;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Represents the time unit types used in date manipulation.
|
|
183
|
-
*
|
|
184
|
-
* @remarks
|
|
185
|
-
* This type is used to specify the unit of time when performing operations like adding or subtracting time from a date.
|
|
186
|
-
*/
|
|
187
|
-
type TimeUnit = "years" | "quarters" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds" | "milliseconds";
|
|
188
|
-
/**
|
|
189
|
-
* Interface for date utility functions used in the Storm Stack.
|
|
190
|
-
*
|
|
191
|
-
* @typeParam TDate - The date object type used by the underlying date library.
|
|
192
|
-
* @typeParam TLocale - The locale type used by the underlying date library.
|
|
193
|
-
*
|
|
194
|
-
* @remarks
|
|
195
|
-
* This interface defines a contract for date manipulation and formatting utilities, abstracting over different date libraries (such as [Moment.js](https://momentjs.com/), [Day.js](https://day.js.org/), etc.). It provides methods for creating, parsing, comparing, and formatting dates, as well as manipulating date components and handling localization.
|
|
196
|
-
*/
|
|
197
|
-
interface StormDateInterface<TDate, TLocale> {
|
|
198
|
-
/**
|
|
199
|
-
* The set of date formats supported by the utility.
|
|
200
|
-
*/
|
|
201
|
-
formats: DateFormats<any>;
|
|
202
|
-
/**
|
|
203
|
-
* The current locale object, if available.
|
|
204
|
-
*/
|
|
205
|
-
locale?: TLocale;
|
|
206
|
-
/**
|
|
207
|
-
* The [Moment.js](https://momentjs.com/) instance, if using [Moment.js](https://momentjs.com/) as the underlying library.
|
|
208
|
-
*/
|
|
209
|
-
moment?: any;
|
|
210
|
-
/**
|
|
211
|
-
* The [Day.js](https://day.js.org/) instance, if using [Day.js](https://day.js.org/) as the underlying library.
|
|
212
|
-
*/
|
|
213
|
-
dayjs?: any;
|
|
214
|
-
/**
|
|
215
|
-
* Name of the currently used date library.
|
|
216
|
-
*/
|
|
217
|
-
type: string;
|
|
218
|
-
/**
|
|
219
|
-
* Create a new `Date` object with the underlying library.
|
|
220
|
-
*
|
|
221
|
-
* @remarks
|
|
222
|
-
* This method supports some of the standard input sources like ISO strings so you can pass the string directly as `date("2024-01-10T14:30:00Z")`, and javascript `Date` objects `date(new Date())`. If `null` is passed `null` will be returned.
|
|
223
|
-
*
|
|
224
|
-
* @param value - The value to create a date object from. Can be a string, number, or JavaScript Date object.
|
|
225
|
-
* @returns A date object of type `TDate` or `null` if the input is `null`.
|
|
226
|
-
*/
|
|
227
|
-
createDate: <TArg = undefined, TResultingDate = (TArg extends null ? null : TArg extends undefined ? TDate : TDate | null)>(value?: TArg) => TResultingDate;
|
|
228
|
-
/**
|
|
229
|
-
* Creates a date object from a JavaScript Date object.
|
|
230
|
-
*
|
|
231
|
-
* @remarks
|
|
232
|
-
* This method is used to create a date object from a JavaScript Date object. It is useful for converting JavaScript Date objects to the date library's date objects.
|
|
233
|
-
*/
|
|
234
|
-
toJsDate: (value: TDate) => Date;
|
|
235
|
-
/**
|
|
236
|
-
* Creates a date object from an ISO string.
|
|
237
|
-
*
|
|
238
|
-
* @remarks
|
|
239
|
-
* This method is used to create a date object from an ISO string. It is useful for parsing dates from strings.
|
|
240
|
-
*/
|
|
241
|
-
parseISO: (isString: string) => TDate;
|
|
242
|
-
/**
|
|
243
|
-
* Converts a date object to an ISO string.
|
|
244
|
-
*
|
|
245
|
-
* @remarks
|
|
246
|
-
* This method is used to convert a date object to an ISO string. It is useful for serializing dates to strings.
|
|
247
|
-
*/
|
|
248
|
-
toISO: (value: TDate) => string;
|
|
249
|
-
/**
|
|
250
|
-
* Creates a date object from a string using the specified format.
|
|
251
|
-
*
|
|
252
|
-
* @remarks
|
|
253
|
-
* This method is used to create a date object from a string using the specified format. It is useful for parsing dates from strings with custom formats.
|
|
254
|
-
*/
|
|
255
|
-
parse: (value: string, format: string) => TDate | null;
|
|
256
|
-
/**
|
|
257
|
-
* Returns the current locale code.
|
|
258
|
-
*
|
|
259
|
-
* @returns The current locale code.
|
|
260
|
-
*/
|
|
261
|
-
getCurrentLocaleCode: () => string;
|
|
262
|
-
/**
|
|
263
|
-
* Returns an indicator if the current locale is using a 12-hour cycle.
|
|
264
|
-
*
|
|
265
|
-
* @returns `true` if the current locale is using a 12-hour cycle, otherwise `false`.
|
|
266
|
-
*/
|
|
267
|
-
is12HourCycleInCurrentLocale: () => boolean;
|
|
268
|
-
/**
|
|
269
|
-
* Returns user readable format (taking into account localized format tokens), useful to render helper text for input (e.g. placeholder). If helper can not be created and for [Luxon](https://moment.github.io/luxon/#/) always returns empty string.
|
|
270
|
-
*
|
|
271
|
-
* @param format - The format string to use.
|
|
272
|
-
* @returns The user readable format string.
|
|
273
|
-
*/
|
|
274
|
-
getFormatHelperText: (format: string) => string;
|
|
275
|
-
/**
|
|
276
|
-
* Checks if the value is null.
|
|
277
|
-
*
|
|
278
|
-
* @param value - The value to check.
|
|
279
|
-
* @returns `true` if the value is null, otherwise `false`.
|
|
280
|
-
*/
|
|
281
|
-
isNull: (value: TDate | null) => boolean;
|
|
282
|
-
/**
|
|
283
|
-
* Checks if the value is valid.
|
|
284
|
-
*
|
|
285
|
-
* @param value - The value to check.
|
|
286
|
-
* @returns `true` if the value is valid, otherwise `false`.
|
|
287
|
-
*/
|
|
288
|
-
isValid: (value: any) => boolean;
|
|
289
|
-
/**
|
|
290
|
-
* Returns the difference between two dates.
|
|
291
|
-
*
|
|
292
|
-
* @param value - The first date to compare.
|
|
293
|
-
* @param comparing - The second date to compare.
|
|
294
|
-
* @param unit - The unit of time to use for the comparison.
|
|
295
|
-
* @returns The difference between the two dates in the specified unit.
|
|
296
|
-
*/
|
|
297
|
-
getDiff: (value: TDate, comparing: TDate | string, unit?: TimeUnit) => number;
|
|
298
|
-
/**
|
|
299
|
-
* Checks if two values are equal.
|
|
300
|
-
*
|
|
301
|
-
* @param value - The first value to compare.
|
|
302
|
-
* @param comparing - The second value to compare.
|
|
303
|
-
* @returns `true` if the two values are equal, otherwise `false`.
|
|
304
|
-
*/
|
|
305
|
-
isEqual: (value: any, comparing: any) => boolean;
|
|
306
|
-
/**
|
|
307
|
-
* Checks if two dates are the same day.
|
|
308
|
-
*
|
|
309
|
-
* @param value - The first date to compare.
|
|
310
|
-
* @param comparing - The second date to compare.
|
|
311
|
-
* @returns `true` if the two dates are the same day, otherwise `false`.
|
|
312
|
-
*/
|
|
313
|
-
isSameDay: (value: TDate, comparing: TDate) => boolean;
|
|
314
|
-
/**
|
|
315
|
-
* Checks if two dates are the same month.
|
|
316
|
-
*
|
|
317
|
-
* @param value - The first date to compare.
|
|
318
|
-
* @param comparing - The second date to compare.
|
|
319
|
-
* @returns `true` if the two dates are the same month, otherwise `false`.
|
|
320
|
-
*/
|
|
321
|
-
isSameMonth: (value: TDate, comparing: TDate) => boolean;
|
|
322
|
-
/**
|
|
323
|
-
* Checks if two dates are the same year.
|
|
324
|
-
*
|
|
325
|
-
* @param value - The first date to compare.
|
|
326
|
-
* @param comparing - The second date to compare.
|
|
327
|
-
* @returns `true` if the two dates are the same year, otherwise `false`.
|
|
328
|
-
*/
|
|
329
|
-
isSameYear: (value: TDate, comparing: TDate) => boolean;
|
|
330
|
-
/**
|
|
331
|
-
* Checks if two dates are the same hour.
|
|
332
|
-
*
|
|
333
|
-
* @param value - The first date to compare.
|
|
334
|
-
* @param comparing - The second date to compare.
|
|
335
|
-
* @returns `true` if the two dates are the same hour, otherwise `false`.
|
|
336
|
-
*/
|
|
337
|
-
isSameHour: (value: TDate, comparing: TDate) => boolean;
|
|
338
|
-
/**
|
|
339
|
-
* Checks if two dates are after each other.
|
|
340
|
-
*
|
|
341
|
-
* @param value - The first date to compare.
|
|
342
|
-
* @param comparing - The second date to compare.
|
|
343
|
-
* @returns `true` if the first date is after the second date, otherwise `false`.
|
|
344
|
-
*/
|
|
345
|
-
isAfter: (value: TDate, comparing: TDate) => boolean;
|
|
346
|
-
/**
|
|
347
|
-
* Checks if two dates are after each other on the same day.
|
|
348
|
-
*
|
|
349
|
-
* @param value - The first date to compare.
|
|
350
|
-
* @param comparing - The second date to compare.
|
|
351
|
-
* @returns `true` if the first date is after the second date on the same day, otherwise `false`.
|
|
352
|
-
*/
|
|
353
|
-
isAfterDay: (value: TDate, comparing: TDate) => boolean;
|
|
354
|
-
/**
|
|
355
|
-
* Checks if two dates are after each other on the same month.
|
|
356
|
-
*
|
|
357
|
-
* @param value - The first date to compare.
|
|
358
|
-
* @param comparing - The second date to compare.
|
|
359
|
-
* @returns `true` if the first date is after the second date on the same month, otherwise `false`.
|
|
360
|
-
*/
|
|
361
|
-
isAfterMonth: (value: TDate, comparing: TDate) => boolean;
|
|
362
|
-
/**
|
|
363
|
-
* Checks if two dates are after each other on the same year.
|
|
364
|
-
*
|
|
365
|
-
* @param value - The first date to compare.
|
|
366
|
-
* @param comparing - The second date to compare.
|
|
367
|
-
* @returns `true` if the first date is after the second date on the same year, otherwise `false`.
|
|
368
|
-
*/
|
|
369
|
-
isAfterYear: (value: TDate, comparing: TDate) => boolean;
|
|
370
|
-
/**
|
|
371
|
-
* Checks if two dates are before each other.
|
|
372
|
-
*
|
|
373
|
-
* @param value - The first date to compare.
|
|
374
|
-
* @param comparing - The second date to compare.
|
|
375
|
-
* @returns `true` if the first date is before the second date, otherwise `false`.
|
|
376
|
-
*/
|
|
377
|
-
isBefore: (value: TDate, comparing: TDate) => boolean;
|
|
378
|
-
/**
|
|
379
|
-
* Checks if two dates are before each other on the same day.
|
|
380
|
-
*
|
|
381
|
-
* @param value - The first date to compare.
|
|
382
|
-
* @param comparing - The second date to compare.
|
|
383
|
-
* @returns `true` if the first date is before the second date on the same day, otherwise `false`.
|
|
384
|
-
*/
|
|
385
|
-
isBeforeDay: (value: TDate, comparing: TDate) => boolean;
|
|
386
|
-
/**
|
|
387
|
-
* Checks if two dates are before each other on the same month.
|
|
388
|
-
*
|
|
389
|
-
* @param value - The first date to compare.
|
|
390
|
-
* @param comparing - The second date to compare.
|
|
391
|
-
* @returns `true` if the first date is before the second date on the same month, otherwise `false`.
|
|
392
|
-
*/
|
|
393
|
-
isBeforeMonth: (value: TDate, comparing: TDate) => boolean;
|
|
394
|
-
/**
|
|
395
|
-
* Checks if two dates are before each other on the same year.
|
|
396
|
-
*
|
|
397
|
-
* @param value - The first date to compare.
|
|
398
|
-
* @param comparing - The second date to compare.
|
|
399
|
-
* @returns `true` if the first date is before the second date on the same year, otherwise `false`.
|
|
400
|
-
*/
|
|
401
|
-
isBeforeYear: (value: TDate, comparing: TDate) => boolean;
|
|
402
|
-
/**
|
|
403
|
-
* Checks if a date is within a specific range.
|
|
404
|
-
*
|
|
405
|
-
* @param value - The date to check.
|
|
406
|
-
* @param range - The range to check against.
|
|
407
|
-
* @returns `true` if the date is within the range, otherwise `false`.
|
|
408
|
-
*/
|
|
409
|
-
isWithinRange: (value: TDate, range: [TDate, TDate]) => boolean;
|
|
410
|
-
/**
|
|
411
|
-
* Gets the start of the year for a given date.
|
|
412
|
-
*
|
|
413
|
-
* @param value - The date to get the start of the year for.
|
|
414
|
-
* @returns The start of the year for the given date.
|
|
415
|
-
*/
|
|
416
|
-
startOfYear: (value: TDate) => TDate;
|
|
417
|
-
/**
|
|
418
|
-
* Gets the end of the year for a given date.
|
|
419
|
-
*
|
|
420
|
-
* @param value - The date to get the end of the year for.
|
|
421
|
-
* @returns The end of the year for the given date.
|
|
422
|
-
*/
|
|
423
|
-
endOfYear: (value: TDate) => TDate;
|
|
424
|
-
/**
|
|
425
|
-
* Gets the start of the month for a given date.
|
|
426
|
-
*
|
|
427
|
-
* @param value - The date to get the start of the month for.
|
|
428
|
-
* @returns The start of the month for the given date.
|
|
429
|
-
*/
|
|
430
|
-
startOfMonth: (value: TDate) => TDate;
|
|
431
|
-
/**
|
|
432
|
-
* Gets the end of the month for a given date.
|
|
433
|
-
*
|
|
434
|
-
* @param value - The date to get the end of the month for.
|
|
435
|
-
* @returns The end of the month for the given date.
|
|
436
|
-
*/
|
|
437
|
-
endOfMonth: (value: TDate) => TDate;
|
|
438
|
-
/**
|
|
439
|
-
* Gets the start of the week for a given date.
|
|
440
|
-
*
|
|
441
|
-
* @param value - The date to get the start of the week for.
|
|
442
|
-
* @returns The start of the week for the given date.
|
|
443
|
-
*/
|
|
444
|
-
startOfWeek: (value: TDate) => TDate;
|
|
445
|
-
/**
|
|
446
|
-
* Gets the end of the week for a given date.
|
|
447
|
-
*
|
|
448
|
-
* @param value - The date to get the end of the week for.
|
|
449
|
-
* @returns The end of the week for the given date.
|
|
450
|
-
*/
|
|
451
|
-
endOfWeek: (value: TDate) => TDate;
|
|
452
|
-
/**
|
|
453
|
-
* Adds a specified number of seconds to a date.
|
|
454
|
-
*
|
|
455
|
-
* @param value - The date to add seconds to.
|
|
456
|
-
* @param count - The number of seconds to add.
|
|
457
|
-
* @returns The new date with the seconds added.
|
|
458
|
-
*/
|
|
459
|
-
addSeconds: (value: TDate, count: number) => TDate;
|
|
460
|
-
/**
|
|
461
|
-
* Adds a specified number of minutes to a date.
|
|
462
|
-
*
|
|
463
|
-
* @param value - The date to add minutes to.
|
|
464
|
-
* @param count - The number of minutes to add.
|
|
465
|
-
* @returns The new date with the minutes added.
|
|
466
|
-
*/
|
|
467
|
-
addMinutes: (value: TDate, count: number) => TDate;
|
|
468
|
-
/**
|
|
469
|
-
* Adds a specified number of hours to a date.
|
|
470
|
-
*
|
|
471
|
-
* @param value - The date to add hours to.
|
|
472
|
-
* @param count - The number of hours to add.
|
|
473
|
-
* @returns The new date with the hours added.
|
|
474
|
-
*/
|
|
475
|
-
addHours: (value: TDate, count: number) => TDate;
|
|
476
|
-
/**
|
|
477
|
-
* Adds a specified number of days to a date.
|
|
478
|
-
*
|
|
479
|
-
* @param value - The date to add days to.
|
|
480
|
-
* @param count - The number of days to add.
|
|
481
|
-
* @returns The new date with the days added.
|
|
482
|
-
*/
|
|
483
|
-
addDays: (value: TDate, count: number) => TDate;
|
|
484
|
-
/**
|
|
485
|
-
* Adds a specified number of weeks to a date.
|
|
486
|
-
*
|
|
487
|
-
* @param value - The date to add weeks to.
|
|
488
|
-
* @param count - The number of weeks to add.
|
|
489
|
-
* @returns The new date with the weeks added.
|
|
490
|
-
*/
|
|
491
|
-
addWeeks: (value: TDate, count: number) => TDate;
|
|
492
|
-
/**
|
|
493
|
-
* Adds a specified number of months to a date.
|
|
494
|
-
*
|
|
495
|
-
* @param value - The date to add months to.
|
|
496
|
-
* @param count - The number of months to add.
|
|
497
|
-
* @returns The new date with the months added.
|
|
498
|
-
*/
|
|
499
|
-
addMonths: (value: TDate, count: number) => TDate;
|
|
500
|
-
/**
|
|
501
|
-
* Adds a specified number of years to a date.
|
|
502
|
-
*
|
|
503
|
-
* @param value - The date to add years to.
|
|
504
|
-
* @param count - The number of years to add.
|
|
505
|
-
* @returns The new date with the years added.
|
|
506
|
-
*/
|
|
507
|
-
addYears: (value: TDate, count: number) => TDate;
|
|
508
|
-
/**
|
|
509
|
-
* Gets the start of the day for a given date.
|
|
510
|
-
*
|
|
511
|
-
* @param value - The date to get the start of the day for.
|
|
512
|
-
* @returns The start of the day for the given date.
|
|
513
|
-
*/
|
|
514
|
-
startOfDay: (value: TDate) => TDate;
|
|
515
|
-
/**
|
|
516
|
-
* Gets the end of the day for a given date.
|
|
517
|
-
*
|
|
518
|
-
* @param value - The date to get the end of the day for.
|
|
519
|
-
* @returns The end of the day for the given date.
|
|
520
|
-
*/
|
|
521
|
-
endOfDay: (value: TDate) => TDate;
|
|
522
|
-
/**
|
|
523
|
-
* Formats a date using a predefined format key.
|
|
524
|
-
*
|
|
525
|
-
* @param value - The date to format.
|
|
526
|
-
* @param formatKey - The key of the format to use.
|
|
527
|
-
* @returns The formatted date string.
|
|
528
|
-
*/
|
|
529
|
-
format: (value: TDate, formatKey: keyof DateFormats) => string;
|
|
530
|
-
/**
|
|
531
|
-
* Formats a date using a custom format string.
|
|
532
|
-
*
|
|
533
|
-
* @param value - The date to format.
|
|
534
|
-
* @param formatString - The format string to use.
|
|
535
|
-
* @returns The formatted date string.
|
|
536
|
-
*/
|
|
537
|
-
formatByString: (value: TDate, formatString: string) => string;
|
|
538
|
-
/**
|
|
539
|
-
* Formats a number as a string, possibly applying localization.
|
|
540
|
-
*
|
|
541
|
-
* @param numberToFormat - The number string to format.
|
|
542
|
-
* @returns The formatted number string.
|
|
543
|
-
*/
|
|
544
|
-
formatNumber: (numberToFormat: string) => string;
|
|
545
|
-
/**
|
|
546
|
-
* Gets the hours component of a date.
|
|
547
|
-
*
|
|
548
|
-
* @param value - The date to extract hours from.
|
|
549
|
-
* @returns The hours component.
|
|
550
|
-
*/
|
|
551
|
-
getHours: (value: TDate) => number;
|
|
552
|
-
/**
|
|
553
|
-
* Sets the hours component of a date.
|
|
554
|
-
*
|
|
555
|
-
* @param value - The date to set hours on.
|
|
556
|
-
* @param count - The hours value to set.
|
|
557
|
-
* @returns The new date with the hours set.
|
|
558
|
-
*/
|
|
559
|
-
setHours: (value: TDate, count: number) => TDate;
|
|
560
|
-
/**
|
|
561
|
-
* Gets the minutes component of a date.
|
|
562
|
-
*
|
|
563
|
-
* @param value - The date to extract minutes from.
|
|
564
|
-
* @returns The minutes component.
|
|
565
|
-
*/
|
|
566
|
-
getMinutes: (value: TDate) => number;
|
|
567
|
-
/**
|
|
568
|
-
* Sets the minutes component of a date.
|
|
569
|
-
*
|
|
570
|
-
* @param value - The date to set minutes on.
|
|
571
|
-
* @param count - The minutes value to set.
|
|
572
|
-
* @returns The new date with the minutes set.
|
|
573
|
-
*/
|
|
574
|
-
setMinutes: (value: TDate, count: number) => TDate;
|
|
575
|
-
/**
|
|
576
|
-
* Gets the seconds component of a date.
|
|
577
|
-
*
|
|
578
|
-
* @param value - The date to extract seconds from.
|
|
579
|
-
* @returns The seconds component.
|
|
580
|
-
*/
|
|
581
|
-
getSeconds: (value: TDate) => number;
|
|
582
|
-
/**
|
|
583
|
-
* Sets the seconds component of a date.
|
|
584
|
-
*
|
|
585
|
-
* @param value - The date to set seconds on.
|
|
586
|
-
* @param count - The seconds value to set.
|
|
587
|
-
* @returns The new date with the seconds set.
|
|
588
|
-
*/
|
|
589
|
-
setSeconds: (value: TDate, count: number) => TDate;
|
|
590
|
-
/**
|
|
591
|
-
* Gets the day of the month from a date.
|
|
592
|
-
*
|
|
593
|
-
* @param value - The date to extract the day from.
|
|
594
|
-
* @returns The day of the month.
|
|
595
|
-
*/
|
|
596
|
-
getDate: (value: TDate) => number;
|
|
597
|
-
/**
|
|
598
|
-
* Sets the day of the month on a date.
|
|
599
|
-
*
|
|
600
|
-
* @param value - The date to set the day on.
|
|
601
|
-
* @param count - The day of the month to set.
|
|
602
|
-
* @returns The new date with the day set.
|
|
603
|
-
*/
|
|
604
|
-
setDate: (value: TDate, count: number) => TDate;
|
|
605
|
-
/**
|
|
606
|
-
* Gets the week number for a given date.
|
|
607
|
-
*
|
|
608
|
-
* @param value - The date to get the week number for.
|
|
609
|
-
* @returns The week number.
|
|
610
|
-
*/
|
|
611
|
-
getWeek: (value: TDate) => number;
|
|
612
|
-
/**
|
|
613
|
-
* Gets the month component of a date (0-based).
|
|
614
|
-
*
|
|
615
|
-
* @param value - The date to extract the month from.
|
|
616
|
-
* @returns The month component (0 = January, 11 = December).
|
|
617
|
-
*/
|
|
618
|
-
getMonth: (value: TDate) => number;
|
|
619
|
-
/**
|
|
620
|
-
* Gets the number of days in the month for a given date.
|
|
621
|
-
*
|
|
622
|
-
* @param value - The date to get the number of days in the month for.
|
|
623
|
-
* @returns The number of days in the month.
|
|
624
|
-
*/
|
|
625
|
-
getDaysInMonth: (value: TDate) => number;
|
|
626
|
-
/**
|
|
627
|
-
* Sets the month component of a date (0-based).
|
|
628
|
-
*
|
|
629
|
-
* @param value - The date to set the month on.
|
|
630
|
-
* @param count - The month to set (0 = January, 11 = December).
|
|
631
|
-
* @returns The new date with the month set.
|
|
632
|
-
*/
|
|
633
|
-
setMonth: (value: TDate, count: number) => TDate;
|
|
634
|
-
/**
|
|
635
|
-
* Gets the date representing the next month.
|
|
636
|
-
*
|
|
637
|
-
* @param value - The date to get the next month for.
|
|
638
|
-
* @returns The date in the next month.
|
|
639
|
-
*/
|
|
640
|
-
getNextMonth: (value: TDate) => TDate;
|
|
641
|
-
/**
|
|
642
|
-
* Gets the date representing the previous month.
|
|
643
|
-
*
|
|
644
|
-
* @param value - The date to get the previous month for.
|
|
645
|
-
* @returns The date in the previous month.
|
|
646
|
-
*/
|
|
647
|
-
getPreviousMonth: (value: TDate) => TDate;
|
|
648
|
-
/**
|
|
649
|
-
* Gets an array of dates representing each month in the year of the given date.
|
|
650
|
-
*
|
|
651
|
-
* @param value - The date to get the month array for.
|
|
652
|
-
* @returns An array of dates, one for each month.
|
|
653
|
-
*/
|
|
654
|
-
getMonthArray: (value: TDate) => TDate[];
|
|
655
|
-
/**
|
|
656
|
-
* Gets the year component of a date.
|
|
657
|
-
*
|
|
658
|
-
* @param value - The date to extract the year from.
|
|
659
|
-
* @returns The year component.
|
|
660
|
-
*/
|
|
661
|
-
getYear: (value: TDate) => number;
|
|
662
|
-
/**
|
|
663
|
-
* Sets the year component of a date.
|
|
664
|
-
*
|
|
665
|
-
* @param value - The date to set the year on.
|
|
666
|
-
* @param count - The year to set.
|
|
667
|
-
* @returns The new date with the year set.
|
|
668
|
-
*/
|
|
669
|
-
setYear: (value: TDate, count: number) => TDate;
|
|
670
|
-
/**
|
|
671
|
-
* Merges the date part of one date with the time part of another date.
|
|
672
|
-
*
|
|
673
|
-
* @param date - The date to take the date part from.
|
|
674
|
-
* @param time - The date to take the time part from.
|
|
675
|
-
* @returns The merged date and time.
|
|
676
|
-
*/
|
|
677
|
-
mergeDateAndTime: (date: TDate, time: TDate) => TDate;
|
|
678
|
-
/**
|
|
679
|
-
* Gets the names of the weekdays in the current locale.
|
|
680
|
-
*
|
|
681
|
-
* @returns An array of weekday names.
|
|
682
|
-
*/
|
|
683
|
-
getWeekdays: () => string[];
|
|
684
|
-
/**
|
|
685
|
-
* Gets a 2D array representing the weeks in the month of the given date.
|
|
686
|
-
*
|
|
687
|
-
* @param date - The date to get the week array for.
|
|
688
|
-
* @returns A 2D array of dates, grouped by week.
|
|
689
|
-
*/
|
|
690
|
-
getWeekArray: (date: TDate) => TDate[][];
|
|
691
|
-
/**
|
|
692
|
-
* Gets an array of dates representing the range of years between two dates.
|
|
693
|
-
*
|
|
694
|
-
* @param start - The start date of the range.
|
|
695
|
-
* @param end - The end date of the range.
|
|
696
|
-
* @returns An array of dates, one for each year in the range.
|
|
697
|
-
*/
|
|
698
|
-
getYearRange: (start: TDate, end: TDate) => TDate[];
|
|
699
|
-
/**
|
|
700
|
-
* Gets the localized string for "am" or "pm".
|
|
701
|
-
*
|
|
702
|
-
* @param meridiem - Either "am" or "pm".
|
|
703
|
-
* @returns The localized meridiem string.
|
|
704
|
-
*/
|
|
705
|
-
getMeridiemText: (meridiem: "am" | "pm") => string;
|
|
706
|
-
}
|
|
707
|
-
declare type __ΩDateFormats = any[];
|
|
708
|
-
declare type __ΩTimeUnit = any[];
|
|
709
|
-
declare type __ΩStormDateInterface = any[];
|
|
710
|
-
//#endregion
|
|
711
|
-
export { __ΩStormDateInterface as a, __ΩDateFormats as i, StormDateInterface as n, __ΩTimeUnit as o, TimeUnit as r, DateFormats as t };
|
|
File without changes
|