@optique/temporal 0.9.0-dev.206 → 0.9.0-dev.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/index.cjs +0 -9
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +0 -9
- package/package.json +1 -1
package/LICENSE
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -41,7 +41,6 @@ function instant(options = {}) {
|
|
|
41
41
|
const metavar = options.metavar ?? "TIMESTAMP";
|
|
42
42
|
(0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
|
|
43
43
|
return {
|
|
44
|
-
$mode: "sync",
|
|
45
44
|
metavar,
|
|
46
45
|
parse(input) {
|
|
47
46
|
try {
|
|
@@ -78,7 +77,6 @@ function duration(options = {}) {
|
|
|
78
77
|
const metavar = options.metavar ?? "DURATION";
|
|
79
78
|
(0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
|
|
80
79
|
return {
|
|
81
|
-
$mode: "sync",
|
|
82
80
|
metavar,
|
|
83
81
|
parse(input) {
|
|
84
82
|
try {
|
|
@@ -114,7 +112,6 @@ function zonedDateTime(options = {}) {
|
|
|
114
112
|
const metavar = options.metavar ?? "ZONED_DATETIME";
|
|
115
113
|
(0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
|
|
116
114
|
return {
|
|
117
|
-
$mode: "sync",
|
|
118
115
|
metavar,
|
|
119
116
|
parse(input) {
|
|
120
117
|
try {
|
|
@@ -150,7 +147,6 @@ function plainDate(options = {}) {
|
|
|
150
147
|
const metavar = options.metavar ?? "DATE";
|
|
151
148
|
(0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
|
|
152
149
|
return {
|
|
153
|
-
$mode: "sync",
|
|
154
150
|
metavar,
|
|
155
151
|
parse(input) {
|
|
156
152
|
try {
|
|
@@ -186,7 +182,6 @@ function plainTime(options = {}) {
|
|
|
186
182
|
const metavar = options.metavar ?? "TIME";
|
|
187
183
|
(0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
|
|
188
184
|
return {
|
|
189
|
-
$mode: "sync",
|
|
190
185
|
metavar,
|
|
191
186
|
parse(input) {
|
|
192
187
|
try {
|
|
@@ -222,7 +217,6 @@ function plainDateTime(options = {}) {
|
|
|
222
217
|
const metavar = options.metavar ?? "DATETIME";
|
|
223
218
|
(0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
|
|
224
219
|
return {
|
|
225
|
-
$mode: "sync",
|
|
226
220
|
metavar,
|
|
227
221
|
parse(input) {
|
|
228
222
|
try {
|
|
@@ -258,7 +252,6 @@ function plainYearMonth(options = {}) {
|
|
|
258
252
|
const metavar = options.metavar ?? "YEAR-MONTH";
|
|
259
253
|
(0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
|
|
260
254
|
return {
|
|
261
|
-
$mode: "sync",
|
|
262
255
|
metavar,
|
|
263
256
|
parse(input) {
|
|
264
257
|
try {
|
|
@@ -294,7 +287,6 @@ function plainMonthDay(options = {}) {
|
|
|
294
287
|
const metavar = options.metavar ?? "--MONTH-DAY";
|
|
295
288
|
(0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
|
|
296
289
|
return {
|
|
297
|
-
$mode: "sync",
|
|
298
290
|
metavar,
|
|
299
291
|
parse(input) {
|
|
300
292
|
try {
|
|
@@ -332,7 +324,6 @@ function timeZone(options = {}) {
|
|
|
332
324
|
const metavar = options.metavar ?? "TIMEZONE";
|
|
333
325
|
(0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
|
|
334
326
|
return {
|
|
335
|
-
$mode: "sync",
|
|
336
327
|
metavar,
|
|
337
328
|
parse(input) {
|
|
338
329
|
try {
|
package/dist/index.d.cts
CHANGED
|
@@ -249,7 +249,7 @@ interface TimeZoneOptions {
|
|
|
249
249
|
* @param options Configuration options for the instant parser.
|
|
250
250
|
* @returns A ValueParser that parses strings into Temporal.Instant values.
|
|
251
251
|
*/
|
|
252
|
-
declare function instant(options?: InstantOptions): ValueParser<
|
|
252
|
+
declare function instant(options?: InstantOptions): ValueParser<Temporal.Instant>;
|
|
253
253
|
/**
|
|
254
254
|
* Creates a ValueParser for parsing Temporal.Duration from ISO 8601 duration strings.
|
|
255
255
|
*
|
|
@@ -262,7 +262,7 @@ declare function instant(options?: InstantOptions): ValueParser<"sync", Temporal
|
|
|
262
262
|
* @param options Configuration options for the duration parser.
|
|
263
263
|
* @returns A ValueParser that parses strings into Temporal.Duration values.
|
|
264
264
|
*/
|
|
265
|
-
declare function duration(options?: DurationOptions): ValueParser<
|
|
265
|
+
declare function duration(options?: DurationOptions): ValueParser<Temporal.Duration>;
|
|
266
266
|
/**
|
|
267
267
|
* Creates a ValueParser for parsing Temporal.ZonedDateTime from ISO 8601 strings with timezone.
|
|
268
268
|
*
|
|
@@ -274,7 +274,7 @@ declare function duration(options?: DurationOptions): ValueParser<"sync", Tempor
|
|
|
274
274
|
* @param options Configuration options for the zoned datetime parser.
|
|
275
275
|
* @returns A ValueParser that parses strings into Temporal.ZonedDateTime values.
|
|
276
276
|
*/
|
|
277
|
-
declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<
|
|
277
|
+
declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<Temporal.ZonedDateTime>;
|
|
278
278
|
/**
|
|
279
279
|
* Creates a ValueParser for parsing Temporal.PlainDate from ISO 8601 date strings.
|
|
280
280
|
*
|
|
@@ -286,7 +286,7 @@ declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<"syn
|
|
|
286
286
|
* @param options Configuration options for the plain date parser.
|
|
287
287
|
* @returns A ValueParser that parses strings into Temporal.PlainDate values.
|
|
288
288
|
*/
|
|
289
|
-
declare function plainDate(options?: PlainDateOptions): ValueParser<
|
|
289
|
+
declare function plainDate(options?: PlainDateOptions): ValueParser<Temporal.PlainDate>;
|
|
290
290
|
/**
|
|
291
291
|
* Creates a ValueParser for parsing Temporal.PlainTime from ISO 8601 time strings.
|
|
292
292
|
*
|
|
@@ -298,7 +298,7 @@ declare function plainDate(options?: PlainDateOptions): ValueParser<"sync", Temp
|
|
|
298
298
|
* @param options Configuration options for the plain time parser.
|
|
299
299
|
* @returns A ValueParser that parses strings into Temporal.PlainTime values.
|
|
300
300
|
*/
|
|
301
|
-
declare function plainTime(options?: PlainTimeOptions): ValueParser<
|
|
301
|
+
declare function plainTime(options?: PlainTimeOptions): ValueParser<Temporal.PlainTime>;
|
|
302
302
|
/**
|
|
303
303
|
* Creates a ValueParser for parsing Temporal.PlainDateTime from ISO 8601 datetime strings.
|
|
304
304
|
*
|
|
@@ -310,7 +310,7 @@ declare function plainTime(options?: PlainTimeOptions): ValueParser<"sync", Temp
|
|
|
310
310
|
* @param options Configuration options for the plain datetime parser.
|
|
311
311
|
* @returns A ValueParser that parses strings into Temporal.PlainDateTime values.
|
|
312
312
|
*/
|
|
313
|
-
declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<
|
|
313
|
+
declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<Temporal.PlainDateTime>;
|
|
314
314
|
/**
|
|
315
315
|
* Creates a ValueParser for parsing Temporal.PlainYearMonth from ISO 8601 year-month strings.
|
|
316
316
|
*
|
|
@@ -322,7 +322,7 @@ declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<"syn
|
|
|
322
322
|
* @param options Configuration options for the plain year-month parser.
|
|
323
323
|
* @returns A ValueParser that parses strings into Temporal.PlainYearMonth values.
|
|
324
324
|
*/
|
|
325
|
-
declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<
|
|
325
|
+
declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<Temporal.PlainYearMonth>;
|
|
326
326
|
/**
|
|
327
327
|
* Creates a ValueParser for parsing Temporal.PlainMonthDay from ISO 8601 month-day strings.
|
|
328
328
|
*
|
|
@@ -334,7 +334,7 @@ declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<"s
|
|
|
334
334
|
* @param options Configuration options for the plain month-day parser.
|
|
335
335
|
* @returns A ValueParser that parses strings into Temporal.PlainMonthDay values.
|
|
336
336
|
*/
|
|
337
|
-
declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<
|
|
337
|
+
declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<Temporal.PlainMonthDay>;
|
|
338
338
|
/**
|
|
339
339
|
* Creates a ValueParser for parsing IANA Time Zone Database identifiers.
|
|
340
340
|
*
|
|
@@ -348,6 +348,6 @@ declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<"syn
|
|
|
348
348
|
* @param options Configuration options for the timezone parser.
|
|
349
349
|
* @returns A ValueParser that parses and validates timezone identifiers.
|
|
350
350
|
*/
|
|
351
|
-
declare function timeZone(options?: TimeZoneOptions): ValueParser<
|
|
351
|
+
declare function timeZone(options?: TimeZoneOptions): ValueParser<TimeZone>;
|
|
352
352
|
//#endregion
|
|
353
353
|
export { DurationOptions, InstantOptions, PlainDateOptions, PlainDateTimeOptions, PlainMonthDayOptions, PlainTimeOptions, PlainYearMonthOptions, TimeZone, TimeZoneOptions, ZonedDateTimeOptions, duration, instant, plainDate, plainDateTime, plainMonthDay, plainTime, plainYearMonth, timeZone, zonedDateTime };
|
package/dist/index.d.ts
CHANGED
|
@@ -250,7 +250,7 @@ interface TimeZoneOptions {
|
|
|
250
250
|
* @param options Configuration options for the instant parser.
|
|
251
251
|
* @returns A ValueParser that parses strings into Temporal.Instant values.
|
|
252
252
|
*/
|
|
253
|
-
declare function instant(options?: InstantOptions): ValueParser<
|
|
253
|
+
declare function instant(options?: InstantOptions): ValueParser<Temporal.Instant>;
|
|
254
254
|
/**
|
|
255
255
|
* Creates a ValueParser for parsing Temporal.Duration from ISO 8601 duration strings.
|
|
256
256
|
*
|
|
@@ -263,7 +263,7 @@ declare function instant(options?: InstantOptions): ValueParser<"sync", Temporal
|
|
|
263
263
|
* @param options Configuration options for the duration parser.
|
|
264
264
|
* @returns A ValueParser that parses strings into Temporal.Duration values.
|
|
265
265
|
*/
|
|
266
|
-
declare function duration(options?: DurationOptions): ValueParser<
|
|
266
|
+
declare function duration(options?: DurationOptions): ValueParser<Temporal.Duration>;
|
|
267
267
|
/**
|
|
268
268
|
* Creates a ValueParser for parsing Temporal.ZonedDateTime from ISO 8601 strings with timezone.
|
|
269
269
|
*
|
|
@@ -275,7 +275,7 @@ declare function duration(options?: DurationOptions): ValueParser<"sync", Tempor
|
|
|
275
275
|
* @param options Configuration options for the zoned datetime parser.
|
|
276
276
|
* @returns A ValueParser that parses strings into Temporal.ZonedDateTime values.
|
|
277
277
|
*/
|
|
278
|
-
declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<
|
|
278
|
+
declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<Temporal.ZonedDateTime>;
|
|
279
279
|
/**
|
|
280
280
|
* Creates a ValueParser for parsing Temporal.PlainDate from ISO 8601 date strings.
|
|
281
281
|
*
|
|
@@ -287,7 +287,7 @@ declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<"syn
|
|
|
287
287
|
* @param options Configuration options for the plain date parser.
|
|
288
288
|
* @returns A ValueParser that parses strings into Temporal.PlainDate values.
|
|
289
289
|
*/
|
|
290
|
-
declare function plainDate(options?: PlainDateOptions): ValueParser<
|
|
290
|
+
declare function plainDate(options?: PlainDateOptions): ValueParser<Temporal.PlainDate>;
|
|
291
291
|
/**
|
|
292
292
|
* Creates a ValueParser for parsing Temporal.PlainTime from ISO 8601 time strings.
|
|
293
293
|
*
|
|
@@ -299,7 +299,7 @@ declare function plainDate(options?: PlainDateOptions): ValueParser<"sync", Temp
|
|
|
299
299
|
* @param options Configuration options for the plain time parser.
|
|
300
300
|
* @returns A ValueParser that parses strings into Temporal.PlainTime values.
|
|
301
301
|
*/
|
|
302
|
-
declare function plainTime(options?: PlainTimeOptions): ValueParser<
|
|
302
|
+
declare function plainTime(options?: PlainTimeOptions): ValueParser<Temporal.PlainTime>;
|
|
303
303
|
/**
|
|
304
304
|
* Creates a ValueParser for parsing Temporal.PlainDateTime from ISO 8601 datetime strings.
|
|
305
305
|
*
|
|
@@ -311,7 +311,7 @@ declare function plainTime(options?: PlainTimeOptions): ValueParser<"sync", Temp
|
|
|
311
311
|
* @param options Configuration options for the plain datetime parser.
|
|
312
312
|
* @returns A ValueParser that parses strings into Temporal.PlainDateTime values.
|
|
313
313
|
*/
|
|
314
|
-
declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<
|
|
314
|
+
declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<Temporal.PlainDateTime>;
|
|
315
315
|
/**
|
|
316
316
|
* Creates a ValueParser for parsing Temporal.PlainYearMonth from ISO 8601 year-month strings.
|
|
317
317
|
*
|
|
@@ -323,7 +323,7 @@ declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<"syn
|
|
|
323
323
|
* @param options Configuration options for the plain year-month parser.
|
|
324
324
|
* @returns A ValueParser that parses strings into Temporal.PlainYearMonth values.
|
|
325
325
|
*/
|
|
326
|
-
declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<
|
|
326
|
+
declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<Temporal.PlainYearMonth>;
|
|
327
327
|
/**
|
|
328
328
|
* Creates a ValueParser for parsing Temporal.PlainMonthDay from ISO 8601 month-day strings.
|
|
329
329
|
*
|
|
@@ -335,7 +335,7 @@ declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<"s
|
|
|
335
335
|
* @param options Configuration options for the plain month-day parser.
|
|
336
336
|
* @returns A ValueParser that parses strings into Temporal.PlainMonthDay values.
|
|
337
337
|
*/
|
|
338
|
-
declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<
|
|
338
|
+
declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<Temporal.PlainMonthDay>;
|
|
339
339
|
/**
|
|
340
340
|
* Creates a ValueParser for parsing IANA Time Zone Database identifiers.
|
|
341
341
|
*
|
|
@@ -349,6 +349,6 @@ declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<"syn
|
|
|
349
349
|
* @param options Configuration options for the timezone parser.
|
|
350
350
|
* @returns A ValueParser that parses and validates timezone identifiers.
|
|
351
351
|
*/
|
|
352
|
-
declare function timeZone(options?: TimeZoneOptions): ValueParser<
|
|
352
|
+
declare function timeZone(options?: TimeZoneOptions): ValueParser<TimeZone>;
|
|
353
353
|
//#endregion
|
|
354
354
|
export { DurationOptions, InstantOptions, PlainDateOptions, PlainDateTimeOptions, PlainMonthDayOptions, PlainTimeOptions, PlainYearMonthOptions, TimeZone, TimeZoneOptions, ZonedDateTimeOptions, duration, instant, plainDate, plainDateTime, plainMonthDay, plainTime, plainYearMonth, timeZone, zonedDateTime };
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,6 @@ function instant(options = {}) {
|
|
|
18
18
|
const metavar = options.metavar ?? "TIMESTAMP";
|
|
19
19
|
ensureNonEmptyString(metavar);
|
|
20
20
|
return {
|
|
21
|
-
$mode: "sync",
|
|
22
21
|
metavar,
|
|
23
22
|
parse(input) {
|
|
24
23
|
try {
|
|
@@ -55,7 +54,6 @@ function duration(options = {}) {
|
|
|
55
54
|
const metavar = options.metavar ?? "DURATION";
|
|
56
55
|
ensureNonEmptyString(metavar);
|
|
57
56
|
return {
|
|
58
|
-
$mode: "sync",
|
|
59
57
|
metavar,
|
|
60
58
|
parse(input) {
|
|
61
59
|
try {
|
|
@@ -91,7 +89,6 @@ function zonedDateTime(options = {}) {
|
|
|
91
89
|
const metavar = options.metavar ?? "ZONED_DATETIME";
|
|
92
90
|
ensureNonEmptyString(metavar);
|
|
93
91
|
return {
|
|
94
|
-
$mode: "sync",
|
|
95
92
|
metavar,
|
|
96
93
|
parse(input) {
|
|
97
94
|
try {
|
|
@@ -127,7 +124,6 @@ function plainDate(options = {}) {
|
|
|
127
124
|
const metavar = options.metavar ?? "DATE";
|
|
128
125
|
ensureNonEmptyString(metavar);
|
|
129
126
|
return {
|
|
130
|
-
$mode: "sync",
|
|
131
127
|
metavar,
|
|
132
128
|
parse(input) {
|
|
133
129
|
try {
|
|
@@ -163,7 +159,6 @@ function plainTime(options = {}) {
|
|
|
163
159
|
const metavar = options.metavar ?? "TIME";
|
|
164
160
|
ensureNonEmptyString(metavar);
|
|
165
161
|
return {
|
|
166
|
-
$mode: "sync",
|
|
167
162
|
metavar,
|
|
168
163
|
parse(input) {
|
|
169
164
|
try {
|
|
@@ -199,7 +194,6 @@ function plainDateTime(options = {}) {
|
|
|
199
194
|
const metavar = options.metavar ?? "DATETIME";
|
|
200
195
|
ensureNonEmptyString(metavar);
|
|
201
196
|
return {
|
|
202
|
-
$mode: "sync",
|
|
203
197
|
metavar,
|
|
204
198
|
parse(input) {
|
|
205
199
|
try {
|
|
@@ -235,7 +229,6 @@ function plainYearMonth(options = {}) {
|
|
|
235
229
|
const metavar = options.metavar ?? "YEAR-MONTH";
|
|
236
230
|
ensureNonEmptyString(metavar);
|
|
237
231
|
return {
|
|
238
|
-
$mode: "sync",
|
|
239
232
|
metavar,
|
|
240
233
|
parse(input) {
|
|
241
234
|
try {
|
|
@@ -271,7 +264,6 @@ function plainMonthDay(options = {}) {
|
|
|
271
264
|
const metavar = options.metavar ?? "--MONTH-DAY";
|
|
272
265
|
ensureNonEmptyString(metavar);
|
|
273
266
|
return {
|
|
274
|
-
$mode: "sync",
|
|
275
267
|
metavar,
|
|
276
268
|
parse(input) {
|
|
277
269
|
try {
|
|
@@ -309,7 +301,6 @@ function timeZone(options = {}) {
|
|
|
309
301
|
const metavar = options.metavar ?? "TIMEZONE";
|
|
310
302
|
ensureNonEmptyString(metavar);
|
|
311
303
|
return {
|
|
312
|
-
$mode: "sync",
|
|
313
304
|
metavar,
|
|
314
305
|
parse(input) {
|
|
315
306
|
try {
|