@dereekb/date 10.1.8 → 10.1.10
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 +41 -7
- package/index.esm.js +45 -8
- package/package.json +1 -1
- package/src/lib/date/date.cell.index.d.ts +2 -1
- package/src/lib/date/date.d.ts +8 -0
- package/src/lib/date/date.day.d.ts +3 -3
- package/src/lib/date/date.timezone.d.ts +15 -1
package/index.cjs.js
CHANGED
|
@@ -2099,6 +2099,16 @@ function readDaysOfWeekNames(values, readDate, nameFunction) {
|
|
|
2099
2099
|
function isStartOfDayInUTC(date) {
|
|
2100
2100
|
return date.getUTCHours() === 0 && date.getUTCMinutes() === 0 && date.getUTCSeconds() === 0 && date.getUTCMilliseconds() === 0;
|
|
2101
2101
|
}
|
|
2102
|
+
/**
|
|
2103
|
+
* Returns true if the input date is the last millisecond.
|
|
2104
|
+
*
|
|
2105
|
+
* @param date
|
|
2106
|
+
* @param minutesOnly if true, only considers the hour and minute
|
|
2107
|
+
* @returns
|
|
2108
|
+
*/
|
|
2109
|
+
function isEndOfDayInUTC(date, minutesOnly = false) {
|
|
2110
|
+
return date.getUTCHours() === 23 && date.getUTCMinutes() === 59 && (minutesOnly || date.getUTCSeconds() === 59 && date.getUTCMilliseconds() === 999);
|
|
2111
|
+
}
|
|
2102
2112
|
/**
|
|
2103
2113
|
* Returns true if the input date is at midnight for the system.
|
|
2104
2114
|
*
|
|
@@ -3115,6 +3125,17 @@ class DateTimezoneUtcNormalInstance {
|
|
|
3115
3125
|
return this.baseDateToSystemDate(startOfDayForSystem);
|
|
3116
3126
|
}
|
|
3117
3127
|
}
|
|
3128
|
+
/**
|
|
3129
|
+
* End of the given day in UTC.
|
|
3130
|
+
*
|
|
3131
|
+
* @param date
|
|
3132
|
+
* @returns
|
|
3133
|
+
*/
|
|
3134
|
+
endOfDayInBaseDate(date) {
|
|
3135
|
+
const result = this.startOfDayInBaseDate(date);
|
|
3136
|
+
result.setUTCHours(23, 59, 59, 999);
|
|
3137
|
+
return result;
|
|
3138
|
+
}
|
|
3118
3139
|
/**
|
|
3119
3140
|
* Start of the given day for the system.
|
|
3120
3141
|
*
|
|
@@ -3129,6 +3150,15 @@ class DateTimezoneUtcNormalInstance {
|
|
|
3129
3150
|
return dateFns.startOfDay(date !== null && date !== void 0 ? date : new Date());
|
|
3130
3151
|
}
|
|
3131
3152
|
}
|
|
3153
|
+
/**
|
|
3154
|
+
* End of the given day for the system.
|
|
3155
|
+
*
|
|
3156
|
+
* @param date
|
|
3157
|
+
* @returns
|
|
3158
|
+
*/
|
|
3159
|
+
endOfDayInSystemDate(date) {
|
|
3160
|
+
return dateFns.endOfDay(this.startOfDayInSystemDate(date));
|
|
3161
|
+
}
|
|
3132
3162
|
/**
|
|
3133
3163
|
* Whether or not the system experiences daylight savings for the given year.
|
|
3134
3164
|
*
|
|
@@ -5329,11 +5359,14 @@ function expandUniqueDateCellsFunction(config) {
|
|
|
5329
5359
|
addGapBlock(gapStartIndex, i - 1);
|
|
5330
5360
|
}
|
|
5331
5361
|
const to = Math.min(inputTo, maxAllowedIndex) || 0;
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5362
|
+
let block = null;
|
|
5363
|
+
if (inputBlock != null) {
|
|
5364
|
+
block = Object.assign(Object.assign({}, inputBlock), {
|
|
5365
|
+
i,
|
|
5366
|
+
to
|
|
5367
|
+
});
|
|
5368
|
+
blocks.push(block);
|
|
5369
|
+
}
|
|
5337
5370
|
latestTo = to;
|
|
5338
5371
|
return block;
|
|
5339
5372
|
}
|
|
@@ -5352,8 +5385,8 @@ function expandUniqueDateCellsFunction(config) {
|
|
|
5352
5385
|
};
|
|
5353
5386
|
const block = fillFactory(dateCellRange);
|
|
5354
5387
|
addBlockWithRange(block, i, to !== null && to !== void 0 ? to : i);
|
|
5355
|
-
} else if (blocks.length > 0) {
|
|
5356
|
-
//
|
|
5388
|
+
} else if (fill === 'empty') ; else if (blocks.length > 0) {
|
|
5389
|
+
// only extend if one or more blocks have been pushed
|
|
5357
5390
|
const blockToExtend = util.lastValue(blocks);
|
|
5358
5391
|
blockToExtend.to = inputTo;
|
|
5359
5392
|
}
|
|
@@ -9554,6 +9587,7 @@ exports.isDateRangeInDateRangeFunction = isDateRangeInDateRangeFunction;
|
|
|
9554
9587
|
exports.isDateRangeStart = isDateRangeStart;
|
|
9555
9588
|
exports.isDateWithinDateCellRangeFunction = isDateWithinDateCellRangeFunction;
|
|
9556
9589
|
exports.isEmptyDateCellScheduleEncodedWeek = isEmptyDateCellScheduleEncodedWeek;
|
|
9590
|
+
exports.isEndOfDayInUTC = isEndOfDayInUTC;
|
|
9557
9591
|
exports.isFullDateCellScheduleDateRange = isFullDateCellScheduleDateRange;
|
|
9558
9592
|
exports.isFullDateCellTiming = isFullDateCellTiming;
|
|
9559
9593
|
exports.isFullDateRange = isFullDateRange;
|
package/index.esm.js
CHANGED
|
@@ -2164,6 +2164,17 @@ function isStartOfDayInUTC(date) {
|
|
|
2164
2164
|
return date.getUTCHours() === 0 && date.getUTCMinutes() === 0 && date.getUTCSeconds() === 0 && date.getUTCMilliseconds() === 0;
|
|
2165
2165
|
}
|
|
2166
2166
|
|
|
2167
|
+
/**
|
|
2168
|
+
* Returns true if the input date is the last millisecond.
|
|
2169
|
+
*
|
|
2170
|
+
* @param date
|
|
2171
|
+
* @param minutesOnly if true, only considers the hour and minute
|
|
2172
|
+
* @returns
|
|
2173
|
+
*/
|
|
2174
|
+
function isEndOfDayInUTC(date, minutesOnly = false) {
|
|
2175
|
+
return date.getUTCHours() === 23 && date.getUTCMinutes() === 59 && (minutesOnly || date.getUTCSeconds() === 59 && date.getUTCMilliseconds() === 999);
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2167
2178
|
/**
|
|
2168
2179
|
* Returns true if the input date is at midnight for the system.
|
|
2169
2180
|
*
|
|
@@ -3317,6 +3328,18 @@ class DateTimezoneUtcNormalInstance {
|
|
|
3317
3328
|
}
|
|
3318
3329
|
}
|
|
3319
3330
|
|
|
3331
|
+
/**
|
|
3332
|
+
* End of the given day in UTC.
|
|
3333
|
+
*
|
|
3334
|
+
* @param date
|
|
3335
|
+
* @returns
|
|
3336
|
+
*/
|
|
3337
|
+
endOfDayInBaseDate(date) {
|
|
3338
|
+
const result = this.startOfDayInBaseDate(date);
|
|
3339
|
+
result.setUTCHours(23, 59, 59, 999);
|
|
3340
|
+
return result;
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3320
3343
|
/**
|
|
3321
3344
|
* Start of the given day for the system.
|
|
3322
3345
|
*
|
|
@@ -3332,6 +3355,16 @@ class DateTimezoneUtcNormalInstance {
|
|
|
3332
3355
|
}
|
|
3333
3356
|
}
|
|
3334
3357
|
|
|
3358
|
+
/**
|
|
3359
|
+
* End of the given day for the system.
|
|
3360
|
+
*
|
|
3361
|
+
* @param date
|
|
3362
|
+
* @returns
|
|
3363
|
+
*/
|
|
3364
|
+
endOfDayInSystemDate(date) {
|
|
3365
|
+
return endOfDay(this.startOfDayInSystemDate(date));
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3335
3368
|
/**
|
|
3336
3369
|
* Whether or not the system experiences daylight savings for the given year.
|
|
3337
3370
|
*
|
|
@@ -5824,6 +5857,7 @@ function groupUniqueDateCells(input) {
|
|
|
5824
5857
|
* Determines how to "fill" a DateRange when an empty range is detected.
|
|
5825
5858
|
* - extend: extends the previous block to fill the range.
|
|
5826
5859
|
* - fill: creates a new value using a factory.
|
|
5860
|
+
* - empty: skips the space
|
|
5827
5861
|
*/
|
|
5828
5862
|
|
|
5829
5863
|
/**
|
|
@@ -5882,11 +5916,14 @@ function expandUniqueDateCellsFunction(config) {
|
|
|
5882
5916
|
addGapBlock(gapStartIndex, i - 1);
|
|
5883
5917
|
}
|
|
5884
5918
|
const to = Math.min(inputTo, maxAllowedIndex) || 0;
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5919
|
+
let block = null;
|
|
5920
|
+
if (inputBlock != null) {
|
|
5921
|
+
block = Object.assign({}, inputBlock, {
|
|
5922
|
+
i,
|
|
5923
|
+
to
|
|
5924
|
+
});
|
|
5925
|
+
blocks.push(block);
|
|
5926
|
+
}
|
|
5890
5927
|
latestTo = to;
|
|
5891
5928
|
return block;
|
|
5892
5929
|
}
|
|
@@ -5905,8 +5942,8 @@ function expandUniqueDateCellsFunction(config) {
|
|
|
5905
5942
|
};
|
|
5906
5943
|
const block = fillFactory(dateCellRange);
|
|
5907
5944
|
addBlockWithRange(block, i, to != null ? to : i);
|
|
5908
|
-
} else if (blocks.length > 0) {
|
|
5909
|
-
//
|
|
5945
|
+
} else if (fill === 'empty') ; else if (blocks.length > 0) {
|
|
5946
|
+
// only extend if one or more blocks have been pushed
|
|
5910
5947
|
const blockToExtend = lastValue(blocks);
|
|
5911
5948
|
blockToExtend.to = inputTo;
|
|
5912
5949
|
}
|
|
@@ -10428,4 +10465,4 @@ class ModelRecurrenceInfoUtility {
|
|
|
10428
10465
|
}
|
|
10429
10466
|
}
|
|
10430
10467
|
|
|
10431
|
-
export { AnyIterResult, CalendarDate, CalendarDateType, DATE_CELL_SCHEDULE_ENCODED_WEEK_REGEX, DATE_TODAY_END_VALUE, DATE_TODAY_START_VALUE, DATE_WEEK_END_VALUE, DATE_WEEK_START_VALUE, DEFAULT_EXPAND_DAYS_FOR_DATE_RANGE_MAX_EXPANSION_SIZE, DEFAULT_FULL_DATE_SCHEDULE_RANGE_DURATION, DEFAULT_ITERATE_DAYS_IN_DATE_RANGE_MAX_ITERATIONS, DEFAULT_LAST_ITER_RESULT_MAX_ITERATIONS_ALLOWED, DateCell, DateCellRange, DateCellSchedule, DateCellScheduleDayCode, DateCellTiming, DateDurationSpan, DateRRule, DateRRuleInstance, DateRRuleParseUtility, DateRRuleUtility, DateRange, DateRangeParams, DateRangeType, DateSet, DateTimeMinuteInstance, DateTimeUtilityInstance, DateTimezoneUtcNormalInstance, IsKnownTimezone, IsValidDateCellRange, IsValidDateCellRangeSeries, IsValidDateCellTiming, IterateDaysInDateRangeFunctionBailError, LastIterResult, LimitDateTimeInstance, MAX_FUTURE_DATE, ModelRecurrenceInfo, ModelRecurrenceInfoUtility, NextIterResult, RRuleStringSplitter, SYSTEM_DATE_TIMEZONE_UTC_NORMAL_INSTANCE, UNKNOWN_YEAR_WEEK_CODE, UTC_DATE_TIMEZONE_UTC_NORMAL_INSTANCE, allIndexesInDateCellRange, allIndexesInDateCellRanges, allKnownTimezoneStrings, allTimezoneInfos, allTimezoneStrings, anyHaveExpired, atleastOneNotExpired, baseDateToTargetDate, calculateAllConversions, calculateExpectedDateCellTimingDuration, calculateExpectedDateCellTimingDurationPair, calculateTimezoneOffset, calendarDate, calendarDateFactory, calendarDateForDateDurationSpan, changeDateCellScheduleDateRangeToTimezone, changeDateCellScheduleDateRangeToTimezoneFunction, clampDateFunction, clampDateRangeFunction, clampDateRangeToDateRange, clampDateToDateRange, copyDateCellScheduleDateFilterConfig, copyHoursAndMinutesFromDate, copyHoursAndMinutesFromDateToToday, copyHoursAndMinutesFromDateWithTimezoneNormal, copyHoursAndMinutesFromNow, copyHoursAndMinutesFromNowWithTimezoneNormal, copyHoursAndMinutesFromUTCDate, copyHoursAndMinutesToDate, copyHoursAndMinutesToToday, dateCell, dateCellDayOfWeekFactory, dateCellDayTimingInfoFactory, dateCellDurationSpanHasEndedFilterFunction, dateCellDurationSpanHasNotEndedFilterFunction, dateCellDurationSpanHasNotStartedFilterFunction, dateCellDurationSpanHasStartedFilterFunction, dateCellEndIndex, dateCellIndexRange, dateCellIndexRangeToDateCellRange, dateCellIndexYearWeekCodeFactory, dateCellIndexYearWeekCodeGroupFactory, dateCellIndexsForDateCellScheduleDayCodes, dateCellRange, dateCellRangeBlocksCount, dateCellRangeBlocksCountInfo, dateCellRangeHasRange, dateCellRangeIncludedByRangeFunction, dateCellRangeOfTiming, dateCellRangeOfTimingFactory, dateCellRangeOverlapsRange, dateCellRangeOverlapsRangeFunction, dateCellRangeToDateCellIndexRange, dateCellRangeWithRange, dateCellRangeWithRangeFromIndex, dateCellRangesFullyCoverDateCellRangeFunction, dateCellScheduleDateCellTimingFilter, dateCellScheduleDateFilter, dateCellScheduleDateRange, dateCellScheduleDayCodeFactory, dateCellScheduleDayCodesAreSetsEquivalent, dateCellScheduleDayCodesFromEnabledDays, dateCellScheduleDayCodesSetFromDaysOfWeek, dateCellScheduleEncodedWeek, dateCellTiming, dateCellTimingCompletedTimeRange, dateCellTimingDateFactory, dateCellTimingDateRange, dateCellTimingEndDateFactory, dateCellTimingEndIndex, dateCellTimingEventRange, dateCellTimingExpansionFactory, dateCellTimingFinalStartsAtEvent, dateCellTimingFromDateCellTimingStartsAtEndRange, dateCellTimingLatestCompletedIndex, dateCellTimingRelativeIndexArrayFactory, dateCellTimingRelativeIndexFactory, dateCellTimingStart, dateCellTimingStartDateFactory, dateCellTimingStartPair, dateCellTimingStartsAtDateFactory, dateCellTimingStartsAtForStartOfDay, dateCellTimingTimezoneNormalInstance, dateDurationSpanEndDate, dateFromDateOrTimeNumber, dateFromLogicalDate, dateInterval, dateMonthDayStringFormat, dateOrDateRangeToDateRange, dateOrDayStringRangeToDateRange, dateOrDayStringRangeToISO8601DayStringRange, dateRange, dateRangeDaysCount, dateRangeOverlapsDateRange, dateRangeOverlapsDateRangeFunction, dateRangeRelativeState, dateRelativeStateForDateCellRangeComparedToIndex, dateShortDateAndTimeStringFormat, dateShortDateStringFormat, dateTimeInstance, dateTimeInstanceUtc, dateTimeMinuteDecisionFunction, dateTimeMinuteWholeDayDecisionFunction, dateTimeStringFormat, dateTimezoneUtcNormal, daysToMinutes, durationSpanDateRelativeState, durationSpanToDateRange, earliestDate, enabledDaysFromDateCellScheduleDayCodes, endItreateDaysInDateRangeEarly, expandDateCellCollection, expandDateCellRange, expandDateCellSchedule, expandDateCellScheduleDayCodes, expandDateCellScheduleDayCodesToDayCodesSet, expandDateCellScheduleDayCodesToDayOfWeekSet, expandDateCellScheduleFactory, expandDateCellScheduleRange, expandDateCellScheduleRangeToDateCellRanges, expandDateCellTiming, expandDaysForDateRange, expandDaysForDateRangeFunction, expandUniqueDateCellsFunction, filterDateCellsInDateCellRange, findMaxDate, findMinDate, findNextDateInDateCellScheduleFilter, fitDateRangeToDayPeriod, fitDateRangeToDayPeriodFunction, fitUTCDateRangeToDayPeriod, forEachDayInDateRange, formatDateDistance, formatDateRange, formatDateRangeDistance, formatDateRangeDistanceFunction, formatDateRangeFunction, formatStartedEndedDistanceString, formatToDateString, formatToDayRangeString, formatToDayTimeRangeString, formatToISO8601DateString, formatToISO8601DayString, formatToISO8601DayStringForSystem, formatToISO8601DayStringForUTC, formatToMonthDayString, formatToShortDateAndTimeString, formatToShortDateString, formatToTimeAndDurationString, formatToTimeRangeString, formatToTimeString, fractionalHoursInDurationSpan, fullDateCellScheduleRange, fullDateCellTiming, fullDateCellTimingTimezonePair, fullWeekDateCellScheduleDayCodes, getCurrentSystemOffsetInHours, getCurrentSystemOffsetInMinutes, getCurrentSystemOffsetInMs, getDateCellTimingFirstEventDateRange, getDateCellTimingHoursInEvent, getDaysOfWeekInDateRange, getExpiration, getGreatestDateCellIndexInDateCellRanges, getLeastAndGreatestDateCellIndexInDateCellRanges, getLeastDateCellIndexInDateCellRanges, getNextDateCellTimingIndex, getRelativeDateForDateCellTiming, getRelativeIndexForDateCellTiming, getTimeAM, getTimezoneAbbreviation, getTimezoneLongName, groupDateRangesByDateRelativeState, groupToDateCellRanges, groupUniqueDateCells, guessCurrentTimezone, hasExpired, hoursToMs, inverseDateTimezoneUtcNormalInstanceTransformType, isAfter, isDate, isDateCellRange, isDateCellSchedule, isDateCellScheduleDateRange, isDateCellScheduleEncodedWeek, isDateCellScheduleStartOfDayDateRange, isDateCellTiming, isDateCellTimingRelativeIndexFactory, isDateCellWithinDateCellRange, isDateCellWithinDateCellRangeFunction, isDateInDateRange, isDateInDateRangeFunction, isDateRange, isDateRangeInDateRange, isDateRangeInDateRangeFunction, isDateRangeStart, isDateWithinDateCellRangeFunction, isEmptyDateCellScheduleEncodedWeek, isFullDateCellScheduleDateRange, isFullDateCellTiming, isFullDateRange, isInfiniteDateRange, isKnownTimezone, isLogicalDateStringCode, isMaxFutureDate, isPartialDateRange, isSameDate, isSameDateCellSchedule, isSameDateCellScheduleDateRange, isSameDateCellScheduleEventRange, isSameDateCellTiming, isSameDateCellTimingEventStartsAtEndRange, isSameDateDay, isSameDateDayRange, isSameDateHoursAndMinutes, isSameDateRange, isSameDateTimezoneConversionConfig, isSameDurationSpan, isSameFullDateCellScheduleDateRange, isSameFullDateCellTiming, isStartOfDayForSystem, isStartOfDayInUTC, isValidDateCellIndex, isValidDateCellRange, isValidDateCellRangeSeries, isValidDateCellTiming, isValidDateCellTimingInfo, isValidDateCellTimingStartDate, isValidDateFromTimestringResult, isValidDateTimezoneConversionConfig, isValidFullDateCellTiming, isValidFullDateCellTimingInfo, iterateDaysInDateRange, iterateDaysInDateRangeFunction, latestDate, latestMinute, limitDateTime, limitDateTimeInstance, logicalDateStringCodeDateFactory, makeDateQueryForDateItemRangeFilter, makeDateQueryForDateStartsEndsFilter, makeDateQueryForOccuringFilter, makeDaysAndTimeFiltersFunction, makeMongoDBLikeDateQueryBuilder, maxFutureDate, mergeMongoDBLikeRangeFilters, minutesToMs, modifyDateCellToFitRange, modifyDateCellsToFitRange, modifyDateCellsToFitRangeFunction, msToMinutes, msToSeconds, nowInterval, parseISO8601DayStringToDate, parseJsDateString, parseReadableTimeString, rawDateCellScheduleDayCodes, readDaysOfWeek, readDaysOfWeekNames, readableTimeStringToDate, reduceDatesFunction, requireCurrentTimezone, roundDateTimeDown, roundDateTimeDownToSteps, roundDownToHour, roundDownToMinute, roundToMinuteSteps, safeFormatToISO8601DateString, safeToJsDate, searchTimezoneInfos, shiftDateCellTimingToSystemTimezone, shiftDateCellTimingToTimezone, shiftDateCellTimingToTimezoneFunction, shiftDateCellTimingToUTCTimezone, simplifyDateCellScheduleDayCodes, skipAfterExpiration, skipExpired, skipUntilExpiration, skipUntilTimeElapsedAfterLastEmission, sortByDateFunction, sortByISO8601DateStringFunction, sortByISO8601DateStrings, sortDateCellRangeAndSizeFunction, sortDateCellRanges, sortDateRangeStartAscendingCompareFunction, startOfDayInTimezoneDayStringFactory, startOfDayInTimezoneFromISO8601DayString, startOfWeekForYearWeekCode, systemBaseDateToNormalDate, systemBaseDateToNormalDateOffset, systemDateTimezoneUtcNormal, systemExperiencesDaylightSavings, systemNormalDateToBaseDate, systemNormalDateToBaseDateOffset, takeAfterTimeElapsedSinceLastEmission, takeNextUpcomingTime, targetDateToBaseDate, timeHasExpired, timezoneInfoForSystem, timezoneStringToSearchableString, timezoneStringToTimezoneInfo, toExpiration, toExpires, toISO8601DayString, toISO8601DayStringForSystem, toISO8601DayStringForUTC, toISODateString, toJsDate, toJsDayDate, toLocalReadableTimeString, toReadableTimeString, transformDateInTimezoneNormalFunction, transformDateRangeDatesFunction, transformDateRangeInTimezoneNormalFunction, transformDateRangeToTimezoneFunction, transformDateRangeWithStartOfDay, unixTimeNumberForNow, unixTimeNumberFromDate, unixTimeNumberFromDateOrTimeNumber, unixTimeNumberToDate, updateDateCellTimingToSystemTimezone, updateDateCellTimingToTimezone, updateDateCellTimingToTimezoneFunction, updateDateCellTimingToUTCTimezone, updateDateCellTimingWithDateCellTimingEvent, utcDayForDate, weekdayDateCellScheduleDayCodes, weekendDateCellScheduleDayCodes, yearWeekCode, yearWeekCodeDateFactory, yearWeekCodeDateTimezoneInstance, yearWeekCodeFactory, yearWeekCodeForCalendarMonth, yearWeekCodeForCalendarMonthFactory, yearWeekCodeForDateRange, yearWeekCodeForDateRangeFactory, yearWeekCodeForDateRangeInTimezone, yearWeekCodeFromDate, yearWeekCodeFromPair, yearWeekCodeGroupFactory, yearWeekCodeIndex, yearWeekCodePair, yearWeekCodePairFromDate };
|
|
10468
|
+
export { AnyIterResult, CalendarDate, CalendarDateType, DATE_CELL_SCHEDULE_ENCODED_WEEK_REGEX, DATE_TODAY_END_VALUE, DATE_TODAY_START_VALUE, DATE_WEEK_END_VALUE, DATE_WEEK_START_VALUE, DEFAULT_EXPAND_DAYS_FOR_DATE_RANGE_MAX_EXPANSION_SIZE, DEFAULT_FULL_DATE_SCHEDULE_RANGE_DURATION, DEFAULT_ITERATE_DAYS_IN_DATE_RANGE_MAX_ITERATIONS, DEFAULT_LAST_ITER_RESULT_MAX_ITERATIONS_ALLOWED, DateCell, DateCellRange, DateCellSchedule, DateCellScheduleDayCode, DateCellTiming, DateDurationSpan, DateRRule, DateRRuleInstance, DateRRuleParseUtility, DateRRuleUtility, DateRange, DateRangeParams, DateRangeType, DateSet, DateTimeMinuteInstance, DateTimeUtilityInstance, DateTimezoneUtcNormalInstance, IsKnownTimezone, IsValidDateCellRange, IsValidDateCellRangeSeries, IsValidDateCellTiming, IterateDaysInDateRangeFunctionBailError, LastIterResult, LimitDateTimeInstance, MAX_FUTURE_DATE, ModelRecurrenceInfo, ModelRecurrenceInfoUtility, NextIterResult, RRuleStringSplitter, SYSTEM_DATE_TIMEZONE_UTC_NORMAL_INSTANCE, UNKNOWN_YEAR_WEEK_CODE, UTC_DATE_TIMEZONE_UTC_NORMAL_INSTANCE, allIndexesInDateCellRange, allIndexesInDateCellRanges, allKnownTimezoneStrings, allTimezoneInfos, allTimezoneStrings, anyHaveExpired, atleastOneNotExpired, baseDateToTargetDate, calculateAllConversions, calculateExpectedDateCellTimingDuration, calculateExpectedDateCellTimingDurationPair, calculateTimezoneOffset, calendarDate, calendarDateFactory, calendarDateForDateDurationSpan, changeDateCellScheduleDateRangeToTimezone, changeDateCellScheduleDateRangeToTimezoneFunction, clampDateFunction, clampDateRangeFunction, clampDateRangeToDateRange, clampDateToDateRange, copyDateCellScheduleDateFilterConfig, copyHoursAndMinutesFromDate, copyHoursAndMinutesFromDateToToday, copyHoursAndMinutesFromDateWithTimezoneNormal, copyHoursAndMinutesFromNow, copyHoursAndMinutesFromNowWithTimezoneNormal, copyHoursAndMinutesFromUTCDate, copyHoursAndMinutesToDate, copyHoursAndMinutesToToday, dateCell, dateCellDayOfWeekFactory, dateCellDayTimingInfoFactory, dateCellDurationSpanHasEndedFilterFunction, dateCellDurationSpanHasNotEndedFilterFunction, dateCellDurationSpanHasNotStartedFilterFunction, dateCellDurationSpanHasStartedFilterFunction, dateCellEndIndex, dateCellIndexRange, dateCellIndexRangeToDateCellRange, dateCellIndexYearWeekCodeFactory, dateCellIndexYearWeekCodeGroupFactory, dateCellIndexsForDateCellScheduleDayCodes, dateCellRange, dateCellRangeBlocksCount, dateCellRangeBlocksCountInfo, dateCellRangeHasRange, dateCellRangeIncludedByRangeFunction, dateCellRangeOfTiming, dateCellRangeOfTimingFactory, dateCellRangeOverlapsRange, dateCellRangeOverlapsRangeFunction, dateCellRangeToDateCellIndexRange, dateCellRangeWithRange, dateCellRangeWithRangeFromIndex, dateCellRangesFullyCoverDateCellRangeFunction, dateCellScheduleDateCellTimingFilter, dateCellScheduleDateFilter, dateCellScheduleDateRange, dateCellScheduleDayCodeFactory, dateCellScheduleDayCodesAreSetsEquivalent, dateCellScheduleDayCodesFromEnabledDays, dateCellScheduleDayCodesSetFromDaysOfWeek, dateCellScheduleEncodedWeek, dateCellTiming, dateCellTimingCompletedTimeRange, dateCellTimingDateFactory, dateCellTimingDateRange, dateCellTimingEndDateFactory, dateCellTimingEndIndex, dateCellTimingEventRange, dateCellTimingExpansionFactory, dateCellTimingFinalStartsAtEvent, dateCellTimingFromDateCellTimingStartsAtEndRange, dateCellTimingLatestCompletedIndex, dateCellTimingRelativeIndexArrayFactory, dateCellTimingRelativeIndexFactory, dateCellTimingStart, dateCellTimingStartDateFactory, dateCellTimingStartPair, dateCellTimingStartsAtDateFactory, dateCellTimingStartsAtForStartOfDay, dateCellTimingTimezoneNormalInstance, dateDurationSpanEndDate, dateFromDateOrTimeNumber, dateFromLogicalDate, dateInterval, dateMonthDayStringFormat, dateOrDateRangeToDateRange, dateOrDayStringRangeToDateRange, dateOrDayStringRangeToISO8601DayStringRange, dateRange, dateRangeDaysCount, dateRangeOverlapsDateRange, dateRangeOverlapsDateRangeFunction, dateRangeRelativeState, dateRelativeStateForDateCellRangeComparedToIndex, dateShortDateAndTimeStringFormat, dateShortDateStringFormat, dateTimeInstance, dateTimeInstanceUtc, dateTimeMinuteDecisionFunction, dateTimeMinuteWholeDayDecisionFunction, dateTimeStringFormat, dateTimezoneUtcNormal, daysToMinutes, durationSpanDateRelativeState, durationSpanToDateRange, earliestDate, enabledDaysFromDateCellScheduleDayCodes, endItreateDaysInDateRangeEarly, expandDateCellCollection, expandDateCellRange, expandDateCellSchedule, expandDateCellScheduleDayCodes, expandDateCellScheduleDayCodesToDayCodesSet, expandDateCellScheduleDayCodesToDayOfWeekSet, expandDateCellScheduleFactory, expandDateCellScheduleRange, expandDateCellScheduleRangeToDateCellRanges, expandDateCellTiming, expandDaysForDateRange, expandDaysForDateRangeFunction, expandUniqueDateCellsFunction, filterDateCellsInDateCellRange, findMaxDate, findMinDate, findNextDateInDateCellScheduleFilter, fitDateRangeToDayPeriod, fitDateRangeToDayPeriodFunction, fitUTCDateRangeToDayPeriod, forEachDayInDateRange, formatDateDistance, formatDateRange, formatDateRangeDistance, formatDateRangeDistanceFunction, formatDateRangeFunction, formatStartedEndedDistanceString, formatToDateString, formatToDayRangeString, formatToDayTimeRangeString, formatToISO8601DateString, formatToISO8601DayString, formatToISO8601DayStringForSystem, formatToISO8601DayStringForUTC, formatToMonthDayString, formatToShortDateAndTimeString, formatToShortDateString, formatToTimeAndDurationString, formatToTimeRangeString, formatToTimeString, fractionalHoursInDurationSpan, fullDateCellScheduleRange, fullDateCellTiming, fullDateCellTimingTimezonePair, fullWeekDateCellScheduleDayCodes, getCurrentSystemOffsetInHours, getCurrentSystemOffsetInMinutes, getCurrentSystemOffsetInMs, getDateCellTimingFirstEventDateRange, getDateCellTimingHoursInEvent, getDaysOfWeekInDateRange, getExpiration, getGreatestDateCellIndexInDateCellRanges, getLeastAndGreatestDateCellIndexInDateCellRanges, getLeastDateCellIndexInDateCellRanges, getNextDateCellTimingIndex, getRelativeDateForDateCellTiming, getRelativeIndexForDateCellTiming, getTimeAM, getTimezoneAbbreviation, getTimezoneLongName, groupDateRangesByDateRelativeState, groupToDateCellRanges, groupUniqueDateCells, guessCurrentTimezone, hasExpired, hoursToMs, inverseDateTimezoneUtcNormalInstanceTransformType, isAfter, isDate, isDateCellRange, isDateCellSchedule, isDateCellScheduleDateRange, isDateCellScheduleEncodedWeek, isDateCellScheduleStartOfDayDateRange, isDateCellTiming, isDateCellTimingRelativeIndexFactory, isDateCellWithinDateCellRange, isDateCellWithinDateCellRangeFunction, isDateInDateRange, isDateInDateRangeFunction, isDateRange, isDateRangeInDateRange, isDateRangeInDateRangeFunction, isDateRangeStart, isDateWithinDateCellRangeFunction, isEmptyDateCellScheduleEncodedWeek, isEndOfDayInUTC, isFullDateCellScheduleDateRange, isFullDateCellTiming, isFullDateRange, isInfiniteDateRange, isKnownTimezone, isLogicalDateStringCode, isMaxFutureDate, isPartialDateRange, isSameDate, isSameDateCellSchedule, isSameDateCellScheduleDateRange, isSameDateCellScheduleEventRange, isSameDateCellTiming, isSameDateCellTimingEventStartsAtEndRange, isSameDateDay, isSameDateDayRange, isSameDateHoursAndMinutes, isSameDateRange, isSameDateTimezoneConversionConfig, isSameDurationSpan, isSameFullDateCellScheduleDateRange, isSameFullDateCellTiming, isStartOfDayForSystem, isStartOfDayInUTC, isValidDateCellIndex, isValidDateCellRange, isValidDateCellRangeSeries, isValidDateCellTiming, isValidDateCellTimingInfo, isValidDateCellTimingStartDate, isValidDateFromTimestringResult, isValidDateTimezoneConversionConfig, isValidFullDateCellTiming, isValidFullDateCellTimingInfo, iterateDaysInDateRange, iterateDaysInDateRangeFunction, latestDate, latestMinute, limitDateTime, limitDateTimeInstance, logicalDateStringCodeDateFactory, makeDateQueryForDateItemRangeFilter, makeDateQueryForDateStartsEndsFilter, makeDateQueryForOccuringFilter, makeDaysAndTimeFiltersFunction, makeMongoDBLikeDateQueryBuilder, maxFutureDate, mergeMongoDBLikeRangeFilters, minutesToMs, modifyDateCellToFitRange, modifyDateCellsToFitRange, modifyDateCellsToFitRangeFunction, msToMinutes, msToSeconds, nowInterval, parseISO8601DayStringToDate, parseJsDateString, parseReadableTimeString, rawDateCellScheduleDayCodes, readDaysOfWeek, readDaysOfWeekNames, readableTimeStringToDate, reduceDatesFunction, requireCurrentTimezone, roundDateTimeDown, roundDateTimeDownToSteps, roundDownToHour, roundDownToMinute, roundToMinuteSteps, safeFormatToISO8601DateString, safeToJsDate, searchTimezoneInfos, shiftDateCellTimingToSystemTimezone, shiftDateCellTimingToTimezone, shiftDateCellTimingToTimezoneFunction, shiftDateCellTimingToUTCTimezone, simplifyDateCellScheduleDayCodes, skipAfterExpiration, skipExpired, skipUntilExpiration, skipUntilTimeElapsedAfterLastEmission, sortByDateFunction, sortByISO8601DateStringFunction, sortByISO8601DateStrings, sortDateCellRangeAndSizeFunction, sortDateCellRanges, sortDateRangeStartAscendingCompareFunction, startOfDayInTimezoneDayStringFactory, startOfDayInTimezoneFromISO8601DayString, startOfWeekForYearWeekCode, systemBaseDateToNormalDate, systemBaseDateToNormalDateOffset, systemDateTimezoneUtcNormal, systemExperiencesDaylightSavings, systemNormalDateToBaseDate, systemNormalDateToBaseDateOffset, takeAfterTimeElapsedSinceLastEmission, takeNextUpcomingTime, targetDateToBaseDate, timeHasExpired, timezoneInfoForSystem, timezoneStringToSearchableString, timezoneStringToTimezoneInfo, toExpiration, toExpires, toISO8601DayString, toISO8601DayStringForSystem, toISO8601DayStringForUTC, toISODateString, toJsDate, toJsDayDate, toLocalReadableTimeString, toReadableTimeString, transformDateInTimezoneNormalFunction, transformDateRangeDatesFunction, transformDateRangeInTimezoneNormalFunction, transformDateRangeToTimezoneFunction, transformDateRangeWithStartOfDay, unixTimeNumberForNow, unixTimeNumberFromDate, unixTimeNumberFromDateOrTimeNumber, unixTimeNumberToDate, updateDateCellTimingToSystemTimezone, updateDateCellTimingToTimezone, updateDateCellTimingToTimezoneFunction, updateDateCellTimingToUTCTimezone, updateDateCellTimingWithDateCellTimingEvent, utcDayForDate, weekdayDateCellScheduleDayCodes, weekendDateCellScheduleDayCodes, yearWeekCode, yearWeekCodeDateFactory, yearWeekCodeDateTimezoneInstance, yearWeekCodeFactory, yearWeekCodeForCalendarMonth, yearWeekCodeForCalendarMonthFactory, yearWeekCodeForDateRange, yearWeekCodeForDateRangeFactory, yearWeekCodeForDateRangeInTimezone, yearWeekCodeFromDate, yearWeekCodeFromPair, yearWeekCodeGroupFactory, yearWeekCodeIndex, yearWeekCodePair, yearWeekCodePairFromDate };
|
package/package.json
CHANGED
|
@@ -322,8 +322,9 @@ export declare function groupUniqueDateCells<B extends DateCellRange | UniqueDat
|
|
|
322
322
|
* Determines how to "fill" a DateRange when an empty range is detected.
|
|
323
323
|
* - extend: extends the previous block to fill the range.
|
|
324
324
|
* - fill: creates a new value using a factory.
|
|
325
|
+
* - empty: skips the space
|
|
325
326
|
*/
|
|
326
|
-
export type ExpandUniqueDateCellsFillOption = 'extend' | 'fill';
|
|
327
|
+
export type ExpandUniqueDateCellsFillOption = 'extend' | 'fill' | 'empty';
|
|
327
328
|
/**
|
|
328
329
|
* Determines how overwrite block values that are completely overlapping eachother.
|
|
329
330
|
* - current: keeps the "current" value
|
package/src/lib/date/date.d.ts
CHANGED
|
@@ -168,6 +168,14 @@ export declare function readDaysOfWeekNames<T>(values: T[], readDate: ReadDateFu
|
|
|
168
168
|
* @returns
|
|
169
169
|
*/
|
|
170
170
|
export declare function isStartOfDayInUTC(date: Date): boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Returns true if the input date is the last millisecond.
|
|
173
|
+
*
|
|
174
|
+
* @param date
|
|
175
|
+
* @param minutesOnly if true, only considers the hour and minute
|
|
176
|
+
* @returns
|
|
177
|
+
*/
|
|
178
|
+
export declare function isEndOfDayInUTC(date: Date, minutesOnly?: boolean): boolean;
|
|
171
179
|
/**
|
|
172
180
|
* Returns true if the input date is at midnight for the system.
|
|
173
181
|
*
|
|
@@ -21,21 +21,21 @@ export interface YearMonthDayCodePair {
|
|
|
21
21
|
year: number;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Returns the YearNumber for the
|
|
24
|
+
* Returns the YearNumber for the YearMonthDayCode.
|
|
25
25
|
*
|
|
26
26
|
* @param yearMonthDayCode
|
|
27
27
|
* @returns
|
|
28
28
|
*/
|
|
29
29
|
export declare function yearMonthDayCodeYear(yearMonthDayCode: YearMonthDayCode): YearNumber;
|
|
30
30
|
/**
|
|
31
|
-
* Returns the MonthOfYear for the
|
|
31
|
+
* Returns the MonthOfYear for the YearMonthDayCode.
|
|
32
32
|
*
|
|
33
33
|
* @param yearMonthDayCode
|
|
34
34
|
* @returns
|
|
35
35
|
*/
|
|
36
36
|
export declare function yearMonthDayCodeMonth(yearMonthDayCode: YearMonthDayCode): MonthOfYear;
|
|
37
37
|
/**
|
|
38
|
-
* Returns the DayOfMonth for the
|
|
38
|
+
* Returns the DayOfMonth for the YearMonthDayCode.
|
|
39
39
|
*
|
|
40
40
|
* @param yearMonthDayCode
|
|
41
41
|
* @returns
|
|
@@ -194,7 +194,14 @@ export declare class DateTimezoneUtcNormalInstance implements DateTimezoneBaseDa
|
|
|
194
194
|
*
|
|
195
195
|
* @param date
|
|
196
196
|
*/
|
|
197
|
-
startOfDayInBaseDate(date?: Date | ISO8601DayString):
|
|
197
|
+
startOfDayInBaseDate(date?: Date | ISO8601DayString): BaseDateAsUTC;
|
|
198
|
+
/**
|
|
199
|
+
* End of the given day in UTC.
|
|
200
|
+
*
|
|
201
|
+
* @param date
|
|
202
|
+
* @returns
|
|
203
|
+
*/
|
|
204
|
+
endOfDayInBaseDate(date?: Date | ISO8601DayString): BaseDateAsUTC;
|
|
198
205
|
/**
|
|
199
206
|
* Start of the given day for the system.
|
|
200
207
|
*
|
|
@@ -202,6 +209,13 @@ export declare class DateTimezoneUtcNormalInstance implements DateTimezoneBaseDa
|
|
|
202
209
|
* @returns
|
|
203
210
|
*/
|
|
204
211
|
startOfDayInSystemDate(date?: Date | ISO8601DayString): Date;
|
|
212
|
+
/**
|
|
213
|
+
* End of the given day for the system.
|
|
214
|
+
*
|
|
215
|
+
* @param date
|
|
216
|
+
* @returns
|
|
217
|
+
*/
|
|
218
|
+
endOfDayInSystemDate(date?: Date | ISO8601DayString): Date;
|
|
205
219
|
/**
|
|
206
220
|
* Whether or not the system experiences daylight savings for the given year.
|
|
207
221
|
*
|