@dereekb/date 13.0.7 → 13.1.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.
- package/index.cjs.js +3526 -993
- package/index.esm.js +3515 -983
- package/package.json +5 -6
- package/src/lib/date/date.calendar.d.ts +63 -9
- package/src/lib/date/date.cell.d.ts +203 -104
- package/src/lib/date/date.cell.factory.d.ts +319 -86
- package/src/lib/date/date.cell.filter.d.ts +104 -2
- package/src/lib/date/date.cell.index.d.ts +202 -92
- package/src/lib/date/date.cell.schedule.d.ts +285 -102
- package/src/lib/date/date.cell.schedule.day.d.ts +13 -3
- package/src/lib/date/date.cell.validator.d.ts +6 -8
- package/src/lib/date/date.cell.week.d.ts +24 -3
- package/src/lib/date/date.d.ts +481 -54
- package/src/lib/date/date.day.d.ts +139 -49
- package/src/lib/date/date.duration.d.ts +49 -11
- package/src/lib/date/date.format.d.ts +355 -36
- package/src/lib/date/date.hashset.d.ts +11 -0
- package/src/lib/date/date.logical.d.ts +61 -3
- package/src/lib/date/date.range.d.ts +355 -77
- package/src/lib/date/date.range.string.d.ts +39 -0
- package/src/lib/date/date.range.timezone.d.ts +18 -6
- package/src/lib/date/date.round.d.ts +46 -1
- package/src/lib/date/date.rxjs.d.ts +29 -7
- package/src/lib/date/date.sort.d.ts +36 -9
- package/src/lib/date/date.time.d.ts +197 -26
- package/src/lib/date/date.time.limit.d.ts +67 -4
- package/src/lib/date/date.time.minute.d.ts +269 -30
- package/src/lib/date/date.timezone.d.ts +286 -70
- package/src/lib/date/date.unix.d.ts +3 -0
- package/src/lib/date/date.week.d.ts +115 -51
- package/src/lib/query/query.builder.d.ts +91 -0
- package/src/lib/query/query.builder.mongo.d.ts +50 -0
- package/src/lib/query/query.filter.d.ts +29 -2
- package/src/lib/query/query.request.d.ts +16 -0
- package/src/lib/rrule/date.recurrence.d.ts +66 -22
- package/src/lib/rrule/date.rrule.d.ts +131 -8
- package/src/lib/rrule/date.rrule.extension.d.ts +50 -9
- package/src/lib/rrule/date.rrule.parse.d.ts +85 -2
- package/src/lib/timezone/timezone.d.ts +102 -2
- package/src/lib/timezone/timezone.validator.d.ts +9 -4
|
@@ -6,10 +6,19 @@ import { type YearWeekCode, type YearWeekCodeGroupFactory } from './date.week';
|
|
|
6
6
|
*/
|
|
7
7
|
export type DateCellDayOfWeekFactory = MapFunction<DateCellIndex, DayOfWeek>;
|
|
8
8
|
/**
|
|
9
|
-
* Creates a
|
|
9
|
+
* Creates a factory that maps a {@link DateCellIndex} to its corresponding {@link DayOfWeek}.
|
|
10
10
|
*
|
|
11
|
-
* @param
|
|
12
|
-
* @returns
|
|
11
|
+
* @param inputDayForIndexZero - the day of the week for index 0 (can be a DayOfWeek number or a Date)
|
|
12
|
+
* @returns a function that computes the day of the week for any given index
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { Day } from '@dereekb/util';
|
|
17
|
+
* const dayFactory = dateCellDayOfWeekFactory(Day.MONDAY);
|
|
18
|
+
* dayFactory(0); // Day.MONDAY
|
|
19
|
+
* dayFactory(1); // Day.TUESDAY
|
|
20
|
+
* dayFactory(6); // Day.SUNDAY
|
|
21
|
+
* ```
|
|
13
22
|
*/
|
|
14
23
|
export declare function dateCellDayOfWeekFactory(inputDayForIndexZero: DayOfWeek | Date): DateCellDayOfWeekFactory;
|
|
15
24
|
/**
|
|
@@ -19,6 +28,12 @@ export type DateCellIndexYearWeekCodeFactory = (indexOrDate: DateCellIndex | Dat
|
|
|
19
28
|
export interface DateCellIndexYearWeekCodeConfig {
|
|
20
29
|
readonly timing: DateCellTiming;
|
|
21
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates a factory that computes the {@link YearWeekCode} for a given {@link DateCellIndex} or Date, relative to the configured timing.
|
|
33
|
+
*
|
|
34
|
+
* @param config - timing configuration to compute dates from indexes
|
|
35
|
+
* @returns a function that returns the YearWeekCode for a given index or date
|
|
36
|
+
*/
|
|
22
37
|
export declare function dateCellIndexYearWeekCodeFactory(config: DateCellIndexYearWeekCodeConfig): DateCellIndexYearWeekCodeFactory;
|
|
23
38
|
/**
|
|
24
39
|
* MapFunction that reads the relevant date to use for the YearWeekCode calculation from the input item.
|
|
@@ -28,4 +43,10 @@ export interface DateCellIndexYearWeekCodeGroupFactoryConfig<B> {
|
|
|
28
43
|
readonly dateCellIndexReader: DateCellIndexYearWeekCodeReader<B>;
|
|
29
44
|
readonly dateCellIndexYearWeekCodeFactory: DateCellIndexYearWeekCodeFactory | DateCellIndexYearWeekCodeConfig;
|
|
30
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Creates a factory that groups items by their {@link YearWeekCode} based on a DateCellIndex reader and timing.
|
|
48
|
+
*
|
|
49
|
+
* @param config - reader and factory configuration
|
|
50
|
+
* @returns a function that groups input items into YearWeekCode groups
|
|
51
|
+
*/
|
|
31
52
|
export declare function dateCellIndexYearWeekCodeGroupFactory<B>(config: DateCellIndexYearWeekCodeGroupFactoryConfig<B>): YearWeekCodeGroupFactory<B>;
|