@dereekb/date 11.0.21 → 11.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 CHANGED
@@ -1936,11 +1936,11 @@ function parseJsDateString(input) {
1936
1936
  return dateFns.isValid(date) ? date : undefined;
1937
1937
  }
1938
1938
  function earliestDate(dates, defaultDate = undefined) {
1939
- const filtered = util.filterMaybeValues(dates);
1939
+ const filtered = util.filterMaybeArrayValues(dates);
1940
1940
  return filtered.length > 0 ? dateFns.min(filtered) : defaultDate;
1941
1941
  }
1942
1942
  function latestDate(dates, defaultDate = undefined) {
1943
- const filtered = util.filterMaybeValues(dates);
1943
+ const filtered = util.filterMaybeArrayValues(dates);
1944
1944
  return filtered.length > 0 ? dateFns.max(filtered) : defaultDate;
1945
1945
  }
1946
1946
  function isAfter(a, b, defaultValue = undefined) {
@@ -2095,7 +2095,7 @@ function roundDateToUnixDateTimeNumber(date, roundToUnit, roundType = 'floor') {
2095
2095
  }
2096
2096
  function reduceDatesFunction(reduceDates) {
2097
2097
  return inputDates => {
2098
- const dates = util.filterMaybeValues(util.asArray(inputDates));
2098
+ const dates = util.filterMaybeArrayValues(util.asArray(inputDates));
2099
2099
  let result;
2100
2100
  if (dates.length) {
2101
2101
  result = reduceDates(dates);
@@ -6537,7 +6537,7 @@ function modifyDateCellsToFitRangeFunction(range) {
6537
6537
  } = dateCellRangeWithRange(range);
6538
6538
  const dateCellIsWithinDateCellRange = isDateCellWithinDateCellRangeFunction(range);
6539
6539
  const overlapsRange = dateCellRangeOverlapsRangeFunction(range);
6540
- return input => util.filterMaybeValues(input.map(x => {
6540
+ return input => util.filterMaybeArrayValues(input.map(x => {
6541
6541
  let result;
6542
6542
  const inRange = dateCellIsWithinDateCellRange(x);
6543
6543
  if (inRange) {
package/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { MS_IN_HOUR, MS_IN_MINUTE, MINUTES_IN_DAY, isISO8601DateString, filterMaybeValues, asArray, dayOfWeek, sortNumbersAscendingFunction, MS_IN_SECOND, SORT_VALUE_LESS_THAN, SORT_VALUE_GREATER_THAN, SORT_VALUE_EQUAL, copyArray, compareFnOrder, groupValues, daysOfWeekArray, MS_IN_DAY, minutesToFractionalHours, safeCompareEquality, DATE_NOW_VALUE, mapIdentityFunction, UTC_TIMEZONE_STRING, isSameNonNullValue, isConsideredUtcTimezoneString, cachedGetter, parseISO8601DayStringToUTCDate, replaceStringsFunction, repeatString, isEqualDate, startOfDayForUTCDateInUTC, sortAscendingIndexNumberRefFunction, range, pushArrayItemsIntoArray, sumOfIntegersBetween, makeValuesGroupMap, lastValue, asGetter, indexRangeCheckFunction, mergeFilterFunctions, isDate as isDate$2, HOURS_IN_DAY, getNextDay, enabledDaysFromDaysOfWeek, daysOfWeekFromEnabledDays, firstValueFromIterable, forEachInIterable, addToSet, iterablesAreSetEquivalent, invertFilter, HashSet, roundNumberUpToStep, protectedFactory, TimeAM, isLogicalDateStringCode as isLogicalDateStringCode$1, dateFromLogicalDate as dateFromLogicalDate$1, flattenArray, splitJoinRemainder } from '@dereekb/util';
1
+ import { MS_IN_HOUR, MS_IN_MINUTE, MINUTES_IN_DAY, isISO8601DateString, filterMaybeArrayValues, asArray, dayOfWeek, sortNumbersAscendingFunction, MS_IN_SECOND, SORT_VALUE_LESS_THAN, SORT_VALUE_GREATER_THAN, SORT_VALUE_EQUAL, copyArray, compareFnOrder, groupValues, daysOfWeekArray, MS_IN_DAY, minutesToFractionalHours, safeCompareEquality, DATE_NOW_VALUE, mapIdentityFunction, UTC_TIMEZONE_STRING, isSameNonNullValue, isConsideredUtcTimezoneString, cachedGetter, parseISO8601DayStringToUTCDate, replaceStringsFunction, repeatString, isEqualDate, startOfDayForUTCDateInUTC, sortAscendingIndexNumberRefFunction, range, pushArrayItemsIntoArray, sumOfIntegersBetween, makeValuesGroupMap, lastValue, asGetter, indexRangeCheckFunction, mergeFilterFunctions, isDate as isDate$2, HOURS_IN_DAY, getNextDay, enabledDaysFromDaysOfWeek, daysOfWeekFromEnabledDays, firstValueFromIterable, forEachInIterable, addToSet, iterablesAreSetEquivalent, invertFilter, HashSet, roundNumberUpToStep, protectedFactory, TimeAM, isLogicalDateStringCode as isLogicalDateStringCode$1, dateFromLogicalDate as dateFromLogicalDate$1, flattenArray, splitJoinRemainder } from '@dereekb/util';
2
2
  import { isDate as isDate$1, startOfMinute, isValid, parseISO, min as min$5, max as max$2, isAfter as isAfter$1, isBefore as isBefore$1, isEqual, isSameDay, isPast, addDays, set as set$1, differenceInDays, startOfMonth, endOfWeek, startOfWeek, endOfMonth, addHours, addMinutes, addMilliseconds, startOfDay, addMonths, addWeeks, endOfDay, endOfHour, startOfHour, endOfMinute, millisecondsToHours, millisecondsToMinutes, differenceInHours, formatDistanceStrict, formatDistance, format as format$1, differenceInMinutes, formatDistanceToNow, parse, getMinutes, getSeconds, getMilliseconds, differenceInMilliseconds, getWeek, getYear, setWeek, getDay, addSeconds } from 'date-fns';
3
3
  import { Expose, Type, Exclude } from 'class-transformer';
4
4
  import { IsDate, IsEnum, IsOptional, IsNumber, Min, registerDecorator, buildMessage, IsString, Matches, IsArray, IsBoolean } from 'class-validator';
@@ -1949,7 +1949,7 @@ function parseJsDateString(input) {
1949
1949
  */
1950
1950
 
1951
1951
  function earliestDate(dates, defaultDate = undefined) {
1952
- const filtered = filterMaybeValues(dates);
1952
+ const filtered = filterMaybeArrayValues(dates);
1953
1953
  return filtered.length > 0 ? min$5(filtered) : defaultDate;
1954
1954
  }
1955
1955
 
@@ -1958,7 +1958,7 @@ function earliestDate(dates, defaultDate = undefined) {
1958
1958
  */
1959
1959
 
1960
1960
  function latestDate(dates, defaultDate = undefined) {
1961
- const filtered = filterMaybeValues(dates);
1961
+ const filtered = filterMaybeArrayValues(dates);
1962
1962
  return filtered.length > 0 ? max$2(filtered) : defaultDate;
1963
1963
  }
1964
1964
 
@@ -2162,7 +2162,7 @@ function roundDateToUnixDateTimeNumber(date, roundToUnit, roundType = 'floor') {
2162
2162
  }
2163
2163
  function reduceDatesFunction(reduceDates) {
2164
2164
  return inputDates => {
2165
- const dates = filterMaybeValues(asArray(inputDates));
2165
+ const dates = filterMaybeArrayValues(asArray(inputDates));
2166
2166
  let result;
2167
2167
  if (dates.length) {
2168
2168
  result = reduceDates(dates);
@@ -7249,7 +7249,7 @@ function modifyDateCellsToFitRangeFunction(range) {
7249
7249
  } = dateCellRangeWithRange(range);
7250
7250
  const dateCellIsWithinDateCellRange = isDateCellWithinDateCellRangeFunction(range);
7251
7251
  const overlapsRange = dateCellRangeOverlapsRangeFunction(range);
7252
- return input => filterMaybeValues(input.map(x => {
7252
+ return input => filterMaybeArrayValues(input.map(x => {
7253
7253
  let result;
7254
7254
  const inRange = dateCellIsWithinDateCellRange(x);
7255
7255
  if (inRange) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/date",
3
- "version": "11.0.21",
3
+ "version": "11.1.0",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./src/index.d.ts",