@naturalcycles/js-lib 14.94.0 → 14.95.0
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LocalDate, LocalDateConfig } from './localDate';
|
|
2
2
|
export declare type DateIntervalConfig = DateInterval | string;
|
|
3
|
+
export declare type DateIntervalString = string;
|
|
3
4
|
/**
|
|
4
5
|
* Class that supports ISO8601 "Time interval" standard that looks like `2022-02-24/2022-03-30`.
|
|
5
6
|
*
|
|
@@ -33,6 +34,6 @@ export declare class DateInterval {
|
|
|
33
34
|
* Ranges are INCLUSIVE.
|
|
34
35
|
*/
|
|
35
36
|
getDays(): LocalDate[];
|
|
36
|
-
toString():
|
|
37
|
-
toJSON():
|
|
37
|
+
toString(): DateIntervalString;
|
|
38
|
+
toJSON(): DateIntervalString;
|
|
38
39
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -66,6 +66,6 @@ export * from './datetime/localTime';
|
|
|
66
66
|
export * from './datetime/dateInterval';
|
|
67
67
|
import { LocalDateConfig, LocalDateUnit, Inclusiveness } from './datetime/localDate';
|
|
68
68
|
import { LocalTimeConfig, LocalTimeUnit, LocalTimeComponents } from './datetime/localTime';
|
|
69
|
-
import { DateIntervalConfig } from './datetime/dateInterval';
|
|
70
|
-
export type { DateIntervalConfig, LocalDateConfig, LocalDateUnit, Inclusiveness, LocalTimeConfig, LocalTimeUnit, LocalTimeComponents, AbortableMapper, AbortablePredicate, AbortableAsyncPredicate, AbortableAsyncMapper, PQueueCfg, MemoCache, AsyncMemoCache, PromiseDecoratorCfg, PromiseDecoratorResp, ErrorData, ErrorObject, HttpErrorData, HttpErrorResponse, Admin401ErrorData, Admin403ErrorData, StringMap, PromiseMap, AnyObject, AnyFunction, ValuesOf, ValueOf, KeyValueTuple, ObjectMapper, ObjectPredicate, InstanceId, IsoDate, IsoDateTime, Reviver, PMapOptions, Mapper, AsyncMapper, Predicate, AsyncPredicate, BatchResult, DeferredPromise, PRetryOptions, PTimeoutOptions, TryCatchOptions, StringifyAnyOptions, JsonStringifyFunction, Merge, ReadonlyDeep, Promisable, Simplify, ConditionalPick, ConditionalExcept, Class, UnixTimestamp, Integer, BaseDBEntity, SavedDBEntity, Saved, Unsaved, CreatedUpdated, CreatedUpdatedId, ObjectWithId, AnyObjectWithId, JsonSchema, JsonSchemaAny, JsonSchemaOneOf, JsonSchemaAllOf, JsonSchemaAnyOf, JsonSchemaNot, JsonSchemaRef, JsonSchemaConst, JsonSchemaEnum, JsonSchemaString, JsonSchemaNumber, JsonSchemaBoolean, JsonSchemaNull, JsonSchemaRootObject, JsonSchemaObject, JsonSchemaArray, JsonSchemaTuple, JsonSchemaBuilder, CommonLogLevel, CommonLogWithLevelFunction, CommonLogFunction, CommonLogger, };
|
|
69
|
+
import { DateIntervalConfig, DateIntervalString } from './datetime/dateInterval';
|
|
70
|
+
export type { DateIntervalConfig, DateIntervalString, LocalDateConfig, LocalDateUnit, Inclusiveness, LocalTimeConfig, LocalTimeUnit, LocalTimeComponents, AbortableMapper, AbortablePredicate, AbortableAsyncPredicate, AbortableAsyncMapper, PQueueCfg, MemoCache, AsyncMemoCache, PromiseDecoratorCfg, PromiseDecoratorResp, ErrorData, ErrorObject, HttpErrorData, HttpErrorResponse, Admin401ErrorData, Admin403ErrorData, StringMap, PromiseMap, AnyObject, AnyFunction, ValuesOf, ValueOf, KeyValueTuple, ObjectMapper, ObjectPredicate, InstanceId, IsoDate, IsoDateTime, Reviver, PMapOptions, Mapper, AsyncMapper, Predicate, AsyncPredicate, BatchResult, DeferredPromise, PRetryOptions, PTimeoutOptions, TryCatchOptions, StringifyAnyOptions, JsonStringifyFunction, Merge, ReadonlyDeep, Promisable, Simplify, ConditionalPick, ConditionalExcept, Class, UnixTimestamp, Integer, BaseDBEntity, SavedDBEntity, Saved, Unsaved, CreatedUpdated, CreatedUpdatedId, ObjectWithId, AnyObjectWithId, JsonSchema, JsonSchemaAny, JsonSchemaOneOf, JsonSchemaAllOf, JsonSchemaAnyOf, JsonSchemaNot, JsonSchemaRef, JsonSchemaConst, JsonSchemaEnum, JsonSchemaString, JsonSchemaNumber, JsonSchemaBoolean, JsonSchemaNull, JsonSchemaRootObject, JsonSchemaObject, JsonSchemaArray, JsonSchemaTuple, JsonSchemaBuilder, CommonLogLevel, CommonLogWithLevelFunction, CommonLogFunction, CommonLogger, };
|
|
71
71
|
export { is, _createPromiseDecorator, _stringMapValues, _stringMapEntries, _objectKeys, pMap, _passthroughMapper, _passUndefinedMapper, _passthroughPredicate, _passNothingPredicate, _noop, ErrorMode, pDefer, AggregatedError, pRetry, pRetryFn, pTimeout, pTimeoutFn, _tryCatch, _TryCatch, _stringifyAny, jsonSchema, JsonSchemaAnyBuilder, commonLoggerMinLevel, commonLoggerNoop, commonLogLevelNumber, commonLoggerPipe, commonLoggerPrefix, commonLoggerCreate, PQueue, END, SKIP, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LocalDate, LocalDateConfig } from './localDate'
|
|
2
2
|
|
|
3
3
|
export type DateIntervalConfig = DateInterval | string
|
|
4
|
+
export type DateIntervalString = string
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Class that supports ISO8601 "Time interval" standard that looks like `2022-02-24/2022-03-30`.
|
|
@@ -81,11 +82,11 @@ export class DateInterval {
|
|
|
81
82
|
return days
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
toString():
|
|
85
|
+
toString(): DateIntervalString {
|
|
85
86
|
return [this.start, this.end].join('/')
|
|
86
87
|
}
|
|
87
88
|
|
|
88
|
-
toJSON():
|
|
89
|
+
toJSON(): DateIntervalString {
|
|
89
90
|
return this.toString()
|
|
90
91
|
}
|
|
91
92
|
}
|
package/src/index.ts
CHANGED
|
@@ -161,10 +161,11 @@ export * from './datetime/localTime'
|
|
|
161
161
|
export * from './datetime/dateInterval'
|
|
162
162
|
import { LocalDateConfig, LocalDateUnit, Inclusiveness } from './datetime/localDate'
|
|
163
163
|
import { LocalTimeConfig, LocalTimeUnit, LocalTimeComponents } from './datetime/localTime'
|
|
164
|
-
import { DateIntervalConfig } from './datetime/dateInterval'
|
|
164
|
+
import { DateIntervalConfig, DateIntervalString } from './datetime/dateInterval'
|
|
165
165
|
|
|
166
166
|
export type {
|
|
167
167
|
DateIntervalConfig,
|
|
168
|
+
DateIntervalString,
|
|
168
169
|
LocalDateConfig,
|
|
169
170
|
LocalDateUnit,
|
|
170
171
|
Inclusiveness,
|