@dereekb/date 9.24.46 → 9.25.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +2 -2
  3. package/src/lib/date/date.block.d.ts +373 -16
  4. package/src/lib/date/date.block.day.d.ts +1 -0
  5. package/src/lib/date/date.block.day.js +1 -0
  6. package/src/lib/date/date.block.day.js.map +1 -1
  7. package/src/lib/date/date.block.js +236 -24
  8. package/src/lib/date/date.block.js.map +1 -1
  9. package/src/lib/date/{date.validator.d.ts → date.block.validator.d.ts} +6 -0
  10. package/src/lib/date/{date.validator.js → date.block.validator.js} +7 -1
  11. package/src/lib/date/date.block.validator.js.map +1 -0
  12. package/src/lib/date/date.block.week.d.ts +24 -0
  13. package/src/lib/date/date.block.week.js +12 -0
  14. package/src/lib/date/date.block.week.js.map +1 -1
  15. package/src/lib/date/date.cell.d.ts +357 -0
  16. package/src/lib/date/date.cell.factory.d.ts +337 -0
  17. package/src/lib/date/date.cell.factory.js +479 -0
  18. package/src/lib/date/date.cell.factory.js.map +1 -0
  19. package/src/lib/date/date.cell.filter.d.ts +18 -0
  20. package/src/lib/date/date.cell.filter.js +65 -0
  21. package/src/lib/date/date.cell.filter.js.map +1 -0
  22. package/src/lib/date/date.cell.index.d.ts +375 -0
  23. package/src/lib/date/date.cell.index.js +731 -0
  24. package/src/lib/date/date.cell.index.js.map +1 -0
  25. package/src/lib/date/date.cell.js +518 -0
  26. package/src/lib/date/date.cell.js.map +1 -0
  27. package/src/lib/date/date.cell.schedule.d.ts +409 -0
  28. package/src/lib/date/date.cell.schedule.day.d.ts +9 -0
  29. package/src/lib/date/date.cell.schedule.day.js +15 -0
  30. package/src/lib/date/date.cell.schedule.day.js.map +1 -0
  31. package/src/lib/date/date.cell.schedule.js +667 -0
  32. package/src/lib/date/date.cell.schedule.js.map +1 -0
  33. package/src/lib/date/date.cell.validator.d.ts +14 -0
  34. package/src/lib/date/date.cell.validator.js +67 -0
  35. package/src/lib/date/date.cell.validator.js.map +1 -0
  36. package/src/lib/date/date.cell.week.d.ts +31 -0
  37. package/src/lib/date/date.cell.week.js +40 -0
  38. package/src/lib/date/date.cell.week.js.map +1 -0
  39. package/src/lib/date/date.d.ts +18 -0
  40. package/src/lib/date/date.duration.d.ts +2 -1
  41. package/src/lib/date/date.duration.js +6 -1
  42. package/src/lib/date/date.duration.js.map +1 -1
  43. package/src/lib/date/date.format.js +2 -1
  44. package/src/lib/date/date.format.js.map +1 -1
  45. package/src/lib/date/date.js +29 -1
  46. package/src/lib/date/date.js.map +1 -1
  47. package/src/lib/date/date.range.d.ts +4 -2
  48. package/src/lib/date/date.range.js +6 -4
  49. package/src/lib/date/date.range.js.map +1 -1
  50. package/src/lib/date/date.range.timezone.d.ts +27 -6
  51. package/src/lib/date/date.range.timezone.js +21 -7
  52. package/src/lib/date/date.range.timezone.js.map +1 -1
  53. package/src/lib/date/date.schedule.d.ts +99 -0
  54. package/src/lib/date/date.schedule.js +63 -0
  55. package/src/lib/date/date.schedule.js.map +1 -1
  56. package/src/lib/date/date.time.js +3 -3
  57. package/src/lib/date/date.time.js.map +1 -1
  58. package/src/lib/date/date.timezone.d.ts +98 -3
  59. package/src/lib/date/date.timezone.js +191 -24
  60. package/src/lib/date/date.timezone.js.map +1 -1
  61. package/src/lib/date/date.week.js +3 -1
  62. package/src/lib/date/date.week.js.map +1 -1
  63. package/src/lib/date/index.d.ts +8 -1
  64. package/src/lib/date/index.js +8 -1
  65. package/src/lib/date/index.js.map +1 -1
  66. package/src/lib/expires/expires.js +1 -1
  67. package/src/lib/expires/expires.js.map +1 -1
  68. package/src/lib/timezone/index.d.ts +1 -0
  69. package/src/lib/timezone/index.js +1 -0
  70. package/src/lib/timezone/index.js.map +1 -1
  71. package/src/lib/timezone/timezone.d.ts +7 -0
  72. package/src/lib/timezone/timezone.js +14 -2
  73. package/src/lib/timezone/timezone.js.map +1 -1
  74. package/src/lib/timezone/timezone.validator.d.ts +6 -0
  75. package/src/lib/timezone/timezone.validator.js +26 -0
  76. package/src/lib/timezone/timezone.validator.js.map +1 -0
  77. package/src/lib/date/date.validator.js.map +0 -1
@@ -0,0 +1,409 @@
1
+ import { DateRange } from '@dereekb/date';
2
+ import { StringOrder, Maybe, DayOfWeek, DecisionFunction, FilterFunction, IndexRange, EnabledDays, ArrayOrValue, TimezoneStringRef } from '@dereekb/util';
3
+ import { DateCell, DateCellDurationSpan, DateCellIndex, DateCellTiming, DateCellTimingDateRange, DateCellTimingStartsAtEndRange, FullDateCellTiming, DateCellTimingEventStartsAt } from './date.cell';
4
+ import { DateCellTimingRelativeIndexFactoryInput, DateCellTimingExpansionFactory } from './date.cell.factory';
5
+ import { DateCellRangeOrDateRange, DateCellRangeWithRange } from './date.cell.index';
6
+ import { YearWeekCodeConfig } from './date.week';
7
+ export declare enum DateCellScheduleDayCode {
8
+ /**
9
+ * Special no-op/unused code
10
+ */
11
+ NONE = 0,
12
+ SUNDAY = 1,
13
+ MONDAY = 2,
14
+ TUESDAY = 3,
15
+ WEDNESDAY = 4,
16
+ THURSDAY = 5,
17
+ FRIDAY = 6,
18
+ SATURDAY = 7,
19
+ /**
20
+ * All weekdays (Mon-Fri)
21
+ */
22
+ WEEKDAY = 8,
23
+ /**
24
+ * All weekend days (Sat/Sun)
25
+ */
26
+ WEEKEND = 9
27
+ }
28
+ export declare function fullWeekDateCellScheduleDayCodes(): DateCellScheduleDayCode[];
29
+ export declare function weekdayDateCellScheduleDayCodes(): DateCellScheduleDayCode[];
30
+ export declare function weekendDateCellScheduleDayCodes(): DateCellScheduleDayCode[];
31
+ /**
32
+ * Creates an EnabledDays from the input.
33
+ *
34
+ * @param input
35
+ * @returns
36
+ */
37
+ export declare function enabledDaysFromDateCellScheduleDayCodes(input: Maybe<Iterable<DateCellScheduleDayCode>>): EnabledDays;
38
+ /**
39
+ * Creates an array of simplified DateCellScheduleDayCode[] values from the input.
40
+ *
41
+ * @param input
42
+ * @returns
43
+ */
44
+ export declare function dateCellScheduleDayCodesFromEnabledDays(input: Maybe<EnabledDays>): DateCellScheduleDayCode[];
45
+ /**
46
+ * Encoded days of the week that the job block schedule should contain.
47
+ */
48
+ export declare type DateCellScheduleEncodedWeek = '' | StringOrder<`${DateCellScheduleDayCode}`, ''>;
49
+ export declare const DATE_CELL_SCHEDULE_ENCODED_WEEK_REGEX: RegExp;
50
+ /**
51
+ * Returns true if the input is a DateCellScheduleEncodedWeek.
52
+ *
53
+ * @param input
54
+ * @returns
55
+ */
56
+ export declare function isDateCellScheduleEncodedWeek(input: string): input is DateCellScheduleEncodedWeek;
57
+ /**
58
+ * Returns true if the input string represents an empty DateCellScheduleEncodedWeek.
59
+ *
60
+ * @param input
61
+ * @returns
62
+ */
63
+ export declare function isEmptyDateCellScheduleEncodedWeek(input: string): input is DateCellScheduleEncodedWeek;
64
+ /**
65
+ * Creates a DateCellScheduleEncodedWeek from an array of DateCellScheduleDayCode values.
66
+ *
67
+ * The returned encoded week is simplified.
68
+ *
69
+ * @param codes
70
+ */
71
+ export declare function dateCellScheduleEncodedWeek(codes: Iterable<DateCellScheduleDayCode>): DateCellScheduleEncodedWeek;
72
+ /**
73
+ * Reduces/merges any day codes into more simplified day codes.
74
+ *
75
+ * For instance, if all days of the week are selected, they will be reduced to "8".
76
+ *
77
+ * @param codes
78
+ * @returns
79
+ */
80
+ export declare function simplifyDateCellScheduleDayCodes(codes: Iterable<DateCellScheduleDayCode>): DateCellScheduleDayCode[];
81
+ export declare type DateCellScheduleDayCodesInput = DateCellScheduleEncodedWeek | ArrayOrValue<DateCellScheduleDayCode> | Set<DateCellScheduleDayCode>;
82
+ /**
83
+ * Expands the input DateCellScheduleDayCodesInput to a Set of DayOfWeek values.
84
+ *
85
+ * @param input
86
+ * @returns
87
+ */
88
+ export declare function expandDateCellScheduleDayCodesToDayOfWeekSet(input: DateCellScheduleDayCodesInput): Set<DayOfWeek>;
89
+ export declare function dateCellScheduleDayCodesSetFromDaysOfWeek(input: Iterable<DayOfWeek>): Set<DateCellScheduleDayCode>;
90
+ /**
91
+ * Expands the input into an array of DateCellScheduleDayCode values.
92
+ *
93
+ * @param input
94
+ * @returns
95
+ */
96
+ export declare function expandDateCellScheduleDayCodes(input: DateCellScheduleDayCodesInput): DateCellScheduleDayCode[];
97
+ /**
98
+ * Expands the input DateCellScheduleDayCodesInput to a Set of DayOfWeek values.
99
+ *
100
+ * @param input
101
+ * @returns
102
+ */
103
+ export declare function expandDateCellScheduleDayCodesToDayCodesSet(input: DateCellScheduleDayCodesInput): Set<DateCellScheduleDayCode>;
104
+ /**
105
+ * Converts the input DateCellScheduleDayCodesInput to an array of DateCellScheduleDayCode values, but does not expand
106
+ *
107
+ * @param input
108
+ * @returns
109
+ */
110
+ export declare function rawDateCellScheduleDayCodes(input: DateCellScheduleDayCodesInput): DateCellScheduleDayCode[];
111
+ /**
112
+ * Used to convert the input dates into a DateCellScheduleDayCode.
113
+ */
114
+ export declare type DateCellScheduleDayCodeFactory = (date: Date) => DateCellScheduleDayCode;
115
+ export declare type DateCellScheduleDayCodeConfig = Pick<YearWeekCodeConfig, 'timezone'>;
116
+ /**
117
+ * Creates a DateCellScheduleDayCodeFactory using the optional input config.
118
+ *
119
+ * @param config
120
+ * @returns
121
+ */
122
+ export declare function dateCellScheduleDayCodeFactory(config?: DateCellScheduleDayCodeConfig): DateCellScheduleDayCodeFactory;
123
+ /**
124
+ * Returns true if the input codes, when expanded, are equivalent.
125
+ *
126
+ * @param a
127
+ * @param b
128
+ * @returns
129
+ */
130
+ export declare function dateCellScheduleDayCodesAreSetsEquivalent(a: DateCellScheduleDayCodesInput, b: DateCellScheduleDayCodesInput): boolean;
131
+ /**
132
+ * Scheduled used to filter to disable DateCell values for a job.
133
+ */
134
+ export interface DateCellSchedule {
135
+ /**
136
+ * Days of the week to include.
137
+ */
138
+ w: DateCellScheduleEncodedWeek;
139
+ /**
140
+ * Specific DateCellIndex values to include.
141
+ */
142
+ d?: DateCellIndex[];
143
+ /**
144
+ * Specific DateCellIndex values to exclude.
145
+ */
146
+ ex?: DateCellIndex[];
147
+ }
148
+ /**
149
+ * Returns true if the input is a DateCellSchedule.
150
+ *
151
+ * @param input
152
+ * @returns
153
+ */
154
+ export declare function isDateCellSchedule(input: object): input is DateCellSchedule;
155
+ export declare function isSameDateCellSchedule(a: Maybe<DateCellSchedule>, b: Maybe<DateCellSchedule>): boolean;
156
+ export declare class DateCellSchedule implements DateCellSchedule {
157
+ w: DateCellScheduleEncodedWeek;
158
+ d?: DateCellIndex[];
159
+ ex?: DateCellIndex[];
160
+ constructor(template?: DateCellSchedule);
161
+ }
162
+ /**
163
+ * A DateCellSchedule with a DateRange that signifies and end days.
164
+ */
165
+ export interface DateCellScheduleDateRange extends DateCellSchedule, DateCellTimingDateRange {
166
+ }
167
+ /**
168
+ * A special DateCellScheduleDateRange that has both the start and end times at the start of the day in the target timezone for their given ranges.
169
+ */
170
+ export declare type DateCellScheduleStartOfDayDateRange = DateCellScheduleDateRange;
171
+ /**
172
+ * Returns true if the input is possibly a FullDateCellScheduleRange.
173
+ *
174
+ * Does not check that the input is a valid FullDateCellScheduleRange.
175
+ *
176
+ * @param input
177
+ * @returns
178
+ */
179
+ export declare function isDateCellScheduleDateRange(input: object): input is DateCellScheduleDateRange;
180
+ /**
181
+ * Returns true if the input is a DateCellScheduleDateRange without a duration or startsAt.
182
+ *
183
+ * @param input
184
+ * @returns
185
+ */
186
+ export declare function isDateCellScheduleStartOfDayDateRange(input: object): input is DateCellScheduleStartOfDayDateRange;
187
+ /**
188
+ * Returns true if both inputs have the same schedule and date range.
189
+ *
190
+ * @param a
191
+ * @param b
192
+ * @returns
193
+ */
194
+ export declare function isSameDateCellScheduleDateRange(a: Maybe<DateCellScheduleDateRange>, b: Maybe<DateCellScheduleDateRange>): boolean;
195
+ /**
196
+ * Input for dateCellScheduleDateRange().
197
+ *
198
+ * It should be comprised of parts of a valid DateCellScheduleDateRange already. This means the start/end or startsAt/end is valid and for the given timezone.
199
+ *
200
+ * Invalid input has undetermined behavior.
201
+ */
202
+ export declare type DateCellScheduleDateRangeInput = DateCellSchedule & Partial<TimezoneStringRef & (DateRange | DateCellTimingStartsAtEndRange)>;
203
+ /**
204
+ * Creates a DateCellScheduleDateRange from the input.
205
+ *
206
+ * @param input
207
+ * @returns
208
+ */
209
+ export declare function dateCellScheduleDateRange(input: DateCellScheduleDateRangeInput): DateCellScheduleDateRange;
210
+ /**
211
+ * A DateCellScheduleDateRange that also includes the event's startsAt time.
212
+ */
213
+ export interface DateCellScheduleEventRange extends DateCellScheduleDateRange, DateCellTimingEventStartsAt {
214
+ }
215
+ /**
216
+ * Returns true if both inputs have the same FullDateCellScheduleRange.
217
+ *
218
+ * @param a
219
+ * @param b
220
+ * @returns
221
+ */
222
+ export declare function isSameDateCellScheduleEventRange(a: Maybe<DateCellScheduleEventRange>, b: Maybe<DateCellScheduleEventRange>): boolean;
223
+ /**
224
+ * A DateCellScheduleEventRange that includes the duration and implements FullDateCellTiming.
225
+ */
226
+ export interface FullDateCellScheduleRange extends DateCellScheduleEventRange, FullDateCellTiming {
227
+ }
228
+ /**
229
+ * Returns true if the input is possibly a FullDateCellScheduleRange.
230
+ *
231
+ * Does not check that the input is a valid FullDateCellScheduleRange.
232
+ *
233
+ * @param input
234
+ * @returns
235
+ */
236
+ export declare function isFullDateCellScheduleDateRange(input: object): input is FullDateCellScheduleRange;
237
+ /**
238
+ * Returns true if both inputs have the same FullDateCellScheduleRange.
239
+ *
240
+ * @param a
241
+ * @param b
242
+ * @returns
243
+ */
244
+ export declare function isSameFullDateCellScheduleDateRange(a: Maybe<FullDateCellScheduleRange>, b: Maybe<FullDateCellScheduleRange>): boolean;
245
+ /**
246
+ * Different types of inputs for fullDateCellScheduleRange() that can be used to derive a FullDateCellScheduleRange.
247
+ */
248
+ export declare type FullDateCellScheduleRangeInputDateRange = DateCellScheduleDateRange | DateCellScheduleEventRange | FullDateCellScheduleRange | DateCellScheduleDateRangeInput;
249
+ export interface FullDateCellScheduleRangeInput {
250
+ /**
251
+ * Input schedule range to expand from.
252
+ */
253
+ readonly dateCellScheduleRange: FullDateCellScheduleRangeInputDateRange;
254
+ /**
255
+ * (Optional) Duration of the timing to use.
256
+ *
257
+ * If a duration is provided in the timing, this is ignored unless updateWithDefaults is true.
258
+ */
259
+ readonly duration?: number;
260
+ /**
261
+ * (Optional) Hours/Minutes to copy from when setting the inital startsAt.
262
+ *
263
+ * This will not change the timing's start/end date range, but it will update the end date.
264
+ *
265
+ * If a startsAt is provided in the timing, this is ignored unless updateWithDefaults is true.
266
+ */
267
+ readonly startsAtTime?: Date;
268
+ /**
269
+ * Whether or not to always update the range with the default duration/startsAt time
270
+ */
271
+ readonly updateWithDefaults?: boolean;
272
+ }
273
+ /**
274
+ * If a duration is not set, this is the default used.
275
+ */
276
+ export declare const DEFAULT_FULL_DATE_SCHEDULE_RANGE_DURATION = 1;
277
+ /**
278
+ * Creates a FullDateCellScheduleRange from the input.
279
+ */
280
+ export declare function fullDateCellScheduleRange(input: FullDateCellScheduleRangeInput): FullDateCellScheduleRange;
281
+ /**
282
+ * DateCellScheduleDateFilter input.
283
+ */
284
+ export declare type DateCellScheduleDateFilterInput = DateCellTimingRelativeIndexFactoryInput;
285
+ /**
286
+ * Returns true if the date falls within the schedule.
287
+ */
288
+ export declare type DateCellScheduleDateFilter = DecisionFunction<DateCellScheduleDateFilterInput>;
289
+ /**
290
+ * dateCellScheduleDateFilter() configuration.
291
+ */
292
+ export interface DateCellScheduleDateFilterConfig extends DateCellSchedule, Partial<DateCellTimingStartsAtEndRange & DateCellTimingDateRange> {
293
+ minMaxDateRange?: Maybe<Partial<DateCellRangeOrDateRange>>;
294
+ /**
295
+ * Whether or not to restrict the start as the min date if a min date is not set in minMaxDateRange. True by default.
296
+ */
297
+ setStartAsMinDate?: boolean;
298
+ }
299
+ export declare function copyDateCellScheduleDateFilterConfig(inputFilter: DateCellScheduleDateFilterConfig): DateCellScheduleDateFilterConfig;
300
+ /**
301
+ * Creates a DateCellScheduleDateFilter.
302
+ *
303
+ * @param config
304
+ * @returns
305
+ */
306
+ export declare function dateCellScheduleDateFilter(config: DateCellScheduleDateFilterConfig): DateCellScheduleDateFilter;
307
+ export declare type DateCellScheduleDateCellTimingFilter<B extends DateCell = DateCell> = DecisionFunction<B>;
308
+ /**
309
+ * Configuration for dateCellScheduleDateCellTimingFilter()
310
+ */
311
+ export interface DateCellScheduleDateCellTimingFilterConfig {
312
+ /**
313
+ * Timing to filter with.
314
+ */
315
+ timing: DateCellTiming;
316
+ /**
317
+ * Schedule to filter with.
318
+ */
319
+ schedule: DateCellSchedule;
320
+ /**
321
+ * Wether or not to expand on the inverse of the schedule, returning blocks that are not in the schedule.
322
+ *
323
+ * Other date filtering behaves the same (I.E. onlyBlocksNotYetStarted, etc.)
324
+ */
325
+ invertSchedule?: boolean;
326
+ /**
327
+ * (Optional) date to use when filtering from now.
328
+ */
329
+ now?: Date;
330
+ /**
331
+ * (Optional) filters in blocks that have not yet started. Can be combined with the other filters.
332
+ */
333
+ onlyBlocksThatHaveStarted?: boolean;
334
+ /**
335
+ * (Optional) filters in blocks that have not yet ended. Can be combined with the other filters.
336
+ */
337
+ onlyBlocksThatHaveEnded?: boolean;
338
+ /**
339
+ * (Optional) filters in blocks that have not yet started. Can be combined with the other filters.
340
+ */
341
+ onlyBlocksNotYetStarted?: boolean;
342
+ /**
343
+ * (Optional) filters in blocks that have not yet ended. Can be combined with the other filters.
344
+ */
345
+ onlyBlocksNotYetEnded?: boolean;
346
+ /**
347
+ * (Optional) custom filter function. Can be combined with the other filters.
348
+ */
349
+ durationSpanFilter?: FilterFunction<DateCellDurationSpan<DateCell>>;
350
+ /**
351
+ * (Optional) Maximum number of blocks to return.
352
+ */
353
+ maxDateCellsToReturn?: number;
354
+ }
355
+ /**
356
+ * Creates a DateCellScheduleDateCellTimingFilter.
357
+ *
358
+ * @param param0
359
+ * @returns
360
+ */
361
+ export declare function dateCellScheduleDateCellTimingFilter<B extends DateCell = DateCell>({ timing, schedule }: DateCellScheduleDateCellTimingFilterConfig): DateCellScheduleDateCellTimingFilter<B>;
362
+ /**
363
+ * Creates a DateCellTimingExpansionFactory using the input DateCellScheduleDateCellTimingFilterConfig.
364
+ *
365
+ * @param config
366
+ * @returns
367
+ */
368
+ export declare function expandDateCellScheduleFactory<B extends DateCell = DateCell>(config: DateCellScheduleDateCellTimingFilterConfig): DateCellTimingExpansionFactory<B>;
369
+ export interface ExpandDateCellScheduleInput extends DateCellScheduleDateCellTimingFilterConfig {
370
+ /**
371
+ * Index range to limit the expansion to.
372
+ */
373
+ readonly limitIndexRange?: IndexRange;
374
+ }
375
+ /**
376
+ * Expands the input DateCellTiming and DateCellSchedule into an array of DateCellDurationSpan value that correspond with blocks in the event.
377
+ *
378
+ * Can optionally provide an IndexRange to specify a specific range to filter on. The range will be capped to the range of the timing.
379
+ *
380
+ * @param timing
381
+ * @param schedule
382
+ * @param inputRange
383
+ * @returns
384
+ */
385
+ export declare function expandDateCellSchedule(input: ExpandDateCellScheduleInput): DateCellDurationSpan<DateCell>[];
386
+ /**
387
+ * Input for ExpandDateCellScheduleRangeInput
388
+ */
389
+ export interface ExpandDateCellScheduleRangeInput extends Omit<DateCellScheduleDateCellTimingFilterConfig, 'schedule' | 'timing'> {
390
+ readonly dateCellScheduleRange: FullDateCellScheduleRangeInputDateRange;
391
+ /**
392
+ * (Optional) Duration of the timing to replace the dateCellScheduleRange's duration.
393
+ */
394
+ readonly duration?: number;
395
+ /**
396
+ * (Optional) Hours/Minutes to replace the dateCellScheduleRange's startsAt time.
397
+ *
398
+ * Note, this will modify the timing's end date to be a valid time.
399
+ */
400
+ readonly startsAtTime?: Date;
401
+ }
402
+ /**
403
+ *
404
+ * @param input
405
+ * @returns
406
+ */
407
+ export declare function expandDateCellScheduleRange(input: ExpandDateCellScheduleRangeInput): DateCellDurationSpan<DateCell>[];
408
+ export declare type ExpandDateCellScheduleRangeToDateCellRangeInput = ExpandDateCellScheduleRangeInput;
409
+ export declare function expandDateCellScheduleRangeToDateCellRanges(input: ExpandDateCellScheduleRangeToDateCellRangeInput): DateCellRangeWithRange[];
@@ -0,0 +1,9 @@
1
+ import { DateCellIndex } from './date.cell';
2
+ import { DateCellScheduleDayCodesInput } from './date.cell.schedule';
3
+ /**
4
+ * Converts the input day codes into DateCellIndex values.
5
+ *
6
+ * @param dayCodes
7
+ * @returns
8
+ */
9
+ export declare function dateCellIndexsForDateCellScheduleDayCodes(sundayIndex: DateCellIndex, dayCodes: DateCellScheduleDayCodesInput): DateCellIndex[];
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dateCellIndexsForDateCellScheduleDayCodes = void 0;
4
+ const date_cell_schedule_1 = require("./date.cell.schedule");
5
+ /**
6
+ * Converts the input day codes into DateCellIndex values.
7
+ *
8
+ * @param dayCodes
9
+ * @returns
10
+ */
11
+ function dateCellIndexsForDateCellScheduleDayCodes(sundayIndex, dayCodes) {
12
+ return (0, date_cell_schedule_1.expandDateCellScheduleDayCodes)(dayCodes).map((x) => sundayIndex + x - 1);
13
+ }
14
+ exports.dateCellIndexsForDateCellScheduleDayCodes = dateCellIndexsForDateCellScheduleDayCodes;
15
+ //# sourceMappingURL=date.cell.schedule.day.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.cell.schedule.day.js","sourceRoot":"","sources":["../../../../../../packages/date/src/lib/date/date.cell.schedule.day.ts"],"names":[],"mappings":";;;AACA,6DAAqG;AAErG;;;;;GAKG;AACH,SAAgB,yCAAyC,CAAC,WAA0B,EAAE,QAAuC;IAC3H,OAAO,IAAA,mDAA8B,EAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAClF,CAAC;AAFD,8FAEC"}