init 3
This commit is contained in:
102
node_modules/date-fns/_lib/format/lightFormatters.js
generated
vendored
Normal file
102
node_modules/date-fns/_lib/format/lightFormatters.js
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
"use strict";
|
||||
exports.lightFormatters = void 0;
|
||||
var _index = require("../addLeadingZeros.js");
|
||||
|
||||
/*
|
||||
* | | Unit | | Unit |
|
||||
* |-----|--------------------------------|-----|--------------------------------|
|
||||
* | a | AM, PM | A* | |
|
||||
* | d | Day of month | D | |
|
||||
* | h | Hour [1-12] | H | Hour [0-23] |
|
||||
* | m | Minute | M | Month |
|
||||
* | s | Second | S | Fraction of second |
|
||||
* | y | Year (abs) | Y | |
|
||||
*
|
||||
* Letters marked by * are not implemented but reserved by Unicode standard.
|
||||
*/
|
||||
|
||||
const lightFormatters = (exports.lightFormatters = {
|
||||
// Year
|
||||
y(date, token) {
|
||||
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
||||
// | Year | y | yy | yyy | yyyy | yyyyy |
|
||||
// |----------|-------|----|-------|-------|-------|
|
||||
// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
|
||||
// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
|
||||
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
|
||||
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
||||
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
||||
|
||||
const signedYear = date.getFullYear();
|
||||
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
||||
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
||||
return (0, _index.addLeadingZeros)(
|
||||
token === "yy" ? year % 100 : year,
|
||||
token.length,
|
||||
);
|
||||
},
|
||||
|
||||
// Month
|
||||
M(date, token) {
|
||||
const month = date.getMonth();
|
||||
return token === "M"
|
||||
? String(month + 1)
|
||||
: (0, _index.addLeadingZeros)(month + 1, 2);
|
||||
},
|
||||
|
||||
// Day of the month
|
||||
d(date, token) {
|
||||
return (0, _index.addLeadingZeros)(date.getDate(), token.length);
|
||||
},
|
||||
|
||||
// AM or PM
|
||||
a(date, token) {
|
||||
const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
|
||||
|
||||
switch (token) {
|
||||
case "a":
|
||||
case "aa":
|
||||
return dayPeriodEnumValue.toUpperCase();
|
||||
case "aaa":
|
||||
return dayPeriodEnumValue;
|
||||
case "aaaaa":
|
||||
return dayPeriodEnumValue[0];
|
||||
case "aaaa":
|
||||
default:
|
||||
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
||||
}
|
||||
},
|
||||
|
||||
// Hour [1-12]
|
||||
h(date, token) {
|
||||
return (0, _index.addLeadingZeros)(
|
||||
date.getHours() % 12 || 12,
|
||||
token.length,
|
||||
);
|
||||
},
|
||||
|
||||
// Hour [0-23]
|
||||
H(date, token) {
|
||||
return (0, _index.addLeadingZeros)(date.getHours(), token.length);
|
||||
},
|
||||
|
||||
// Minute
|
||||
m(date, token) {
|
||||
return (0, _index.addLeadingZeros)(date.getMinutes(), token.length);
|
||||
},
|
||||
|
||||
// Second
|
||||
s(date, token) {
|
||||
return (0, _index.addLeadingZeros)(date.getSeconds(), token.length);
|
||||
},
|
||||
|
||||
// Fraction of second
|
||||
S(date, token) {
|
||||
const numberOfDigits = token.length;
|
||||
const milliseconds = date.getMilliseconds();
|
||||
const fractionalSeconds = Math.trunc(
|
||||
milliseconds * Math.pow(10, numberOfDigits - 3),
|
||||
);
|
||||
return (0, _index.addLeadingZeros)(fractionalSeconds, token.length);
|
||||
},
|
||||
});
|
||||
67
node_modules/date-fns/_lib/format/longFormatters.js
generated
vendored
Normal file
67
node_modules/date-fns/_lib/format/longFormatters.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
exports.longFormatters = void 0;
|
||||
|
||||
const dateLongFormatter = (pattern, formatLong) => {
|
||||
switch (pattern) {
|
||||
case "P":
|
||||
return formatLong.date({ width: "short" });
|
||||
case "PP":
|
||||
return formatLong.date({ width: "medium" });
|
||||
case "PPP":
|
||||
return formatLong.date({ width: "long" });
|
||||
case "PPPP":
|
||||
default:
|
||||
return formatLong.date({ width: "full" });
|
||||
}
|
||||
};
|
||||
|
||||
const timeLongFormatter = (pattern, formatLong) => {
|
||||
switch (pattern) {
|
||||
case "p":
|
||||
return formatLong.time({ width: "short" });
|
||||
case "pp":
|
||||
return formatLong.time({ width: "medium" });
|
||||
case "ppp":
|
||||
return formatLong.time({ width: "long" });
|
||||
case "pppp":
|
||||
default:
|
||||
return formatLong.time({ width: "full" });
|
||||
}
|
||||
};
|
||||
|
||||
const dateTimeLongFormatter = (pattern, formatLong) => {
|
||||
const matchResult = pattern.match(/(P+)(p+)?/) || [];
|
||||
const datePattern = matchResult[1];
|
||||
const timePattern = matchResult[2];
|
||||
|
||||
if (!timePattern) {
|
||||
return dateLongFormatter(pattern, formatLong);
|
||||
}
|
||||
|
||||
let dateTimeFormat;
|
||||
|
||||
switch (datePattern) {
|
||||
case "P":
|
||||
dateTimeFormat = formatLong.dateTime({ width: "short" });
|
||||
break;
|
||||
case "PP":
|
||||
dateTimeFormat = formatLong.dateTime({ width: "medium" });
|
||||
break;
|
||||
case "PPP":
|
||||
dateTimeFormat = formatLong.dateTime({ width: "long" });
|
||||
break;
|
||||
case "PPPP":
|
||||
default:
|
||||
dateTimeFormat = formatLong.dateTime({ width: "full" });
|
||||
break;
|
||||
}
|
||||
|
||||
return dateTimeFormat
|
||||
.replace("{{date}}", dateLongFormatter(datePattern, formatLong))
|
||||
.replace("{{time}}", timeLongFormatter(timePattern, formatLong));
|
||||
};
|
||||
|
||||
const longFormatters = (exports.longFormatters = {
|
||||
p: timeLongFormatter,
|
||||
P: dateTimeLongFormatter,
|
||||
});
|
||||
28
node_modules/date-fns/addSeconds.mjs
generated
vendored
Normal file
28
node_modules/date-fns/addSeconds.mjs
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { addMilliseconds } from "./addMilliseconds.mjs";
|
||||
|
||||
/**
|
||||
* @name addSeconds
|
||||
* @category Second Helpers
|
||||
* @summary Add the specified number of seconds to the given date.
|
||||
*
|
||||
* @description
|
||||
* Add the specified number of seconds to the given date.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to be changed
|
||||
* @param amount - The amount of seconds to be added.
|
||||
*
|
||||
* @returns The new date with the seconds added
|
||||
*
|
||||
* @example
|
||||
* // Add 30 seconds to 10 July 2014 12:45:00:
|
||||
* const result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
|
||||
* //=> Thu Jul 10 2014 12:45:30
|
||||
*/
|
||||
export function addSeconds(date, amount) {
|
||||
return addMilliseconds(date, amount * 1000);
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default addSeconds;
|
||||
24
node_modules/date-fns/addWeeks.d.mts
generated
vendored
Normal file
24
node_modules/date-fns/addWeeks.d.mts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @name addWeeks
|
||||
* @category Week Helpers
|
||||
* @summary Add the specified number of weeks to the given date.
|
||||
*
|
||||
* @description
|
||||
* Add the specified number of week to the given date.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to be changed
|
||||
* @param amount - The amount of weeks to be added.
|
||||
*
|
||||
* @returns The new date with the weeks added
|
||||
*
|
||||
* @example
|
||||
* // Add 4 weeks to 1 September 2014:
|
||||
* const result = addWeeks(new Date(2014, 8, 1), 4)
|
||||
* //=> Mon Sep 29 2014 00:00:00
|
||||
*/
|
||||
export declare function addWeeks<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
amount: number,
|
||||
): DateType;
|
||||
24
node_modules/date-fns/addWeeks.d.ts
generated
vendored
Normal file
24
node_modules/date-fns/addWeeks.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @name addWeeks
|
||||
* @category Week Helpers
|
||||
* @summary Add the specified number of weeks to the given date.
|
||||
*
|
||||
* @description
|
||||
* Add the specified number of week to the given date.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to be changed
|
||||
* @param amount - The amount of weeks to be added.
|
||||
*
|
||||
* @returns The new date with the weeks added
|
||||
*
|
||||
* @example
|
||||
* // Add 4 weeks to 1 September 2014:
|
||||
* const result = addWeeks(new Date(2014, 8, 1), 4)
|
||||
* //=> Mon Sep 29 2014 00:00:00
|
||||
*/
|
||||
export declare function addWeeks<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
amount: number,
|
||||
): DateType;
|
||||
27
node_modules/date-fns/addYears.js
generated
vendored
Normal file
27
node_modules/date-fns/addYears.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
exports.addYears = addYears;
|
||||
var _index = require("./addMonths.js");
|
||||
|
||||
/**
|
||||
* @name addYears
|
||||
* @category Year Helpers
|
||||
* @summary Add the specified number of years to the given date.
|
||||
*
|
||||
* @description
|
||||
* Add the specified number of years to the given date.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to be changed
|
||||
* @param amount - The amount of years to be added.
|
||||
*
|
||||
* @returns The new date with the years added
|
||||
*
|
||||
* @example
|
||||
* // Add 5 years to 1 September 2014:
|
||||
* const result = addYears(new Date(2014, 8, 1), 5)
|
||||
* //=> Sun Sep 01 2019 00:00:00
|
||||
*/
|
||||
function addYears(date, amount) {
|
||||
return (0, _index.addMonths)(date, amount * 12);
|
||||
}
|
||||
54
node_modules/date-fns/compareDesc.mjs
generated
vendored
Normal file
54
node_modules/date-fns/compareDesc.mjs
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
import { toDate } from "./toDate.mjs";
|
||||
|
||||
/**
|
||||
* @name compareDesc
|
||||
* @category Common Helpers
|
||||
* @summary Compare the two dates reverse chronologically and return -1, 0 or 1.
|
||||
*
|
||||
* @description
|
||||
* Compare the two dates and return -1 if the first date is after the second,
|
||||
* 1 if the first date is before the second or 0 if dates are equal.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param dateLeft - The first date to compare
|
||||
* @param dateRight - The second date to compare
|
||||
*
|
||||
* @returns The result of the comparison
|
||||
*
|
||||
* @example
|
||||
* // Compare 11 February 1987 and 10 July 1989 reverse chronologically:
|
||||
* const result = compareDesc(new Date(1987, 1, 11), new Date(1989, 6, 10))
|
||||
* //=> 1
|
||||
*
|
||||
* @example
|
||||
* // Sort the array of dates in reverse chronological order:
|
||||
* const result = [
|
||||
* new Date(1995, 6, 2),
|
||||
* new Date(1987, 1, 11),
|
||||
* new Date(1989, 6, 10)
|
||||
* ].sort(compareDesc)
|
||||
* //=> [
|
||||
* // Sun Jul 02 1995 00:00:00,
|
||||
* // Mon Jul 10 1989 00:00:00,
|
||||
* // Wed Feb 11 1987 00:00:00
|
||||
* // ]
|
||||
*/
|
||||
export function compareDesc(dateLeft, dateRight) {
|
||||
const _dateLeft = toDate(dateLeft);
|
||||
const _dateRight = toDate(dateRight);
|
||||
|
||||
const diff = _dateLeft.getTime() - _dateRight.getTime();
|
||||
|
||||
if (diff > 0) {
|
||||
return -1;
|
||||
} else if (diff < 0) {
|
||||
return 1;
|
||||
// Return 0 if diff is 0; return NaN if diff is NaN
|
||||
} else {
|
||||
return diff;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default compareDesc;
|
||||
203
node_modules/date-fns/constants.mjs
generated
vendored
Normal file
203
node_modules/date-fns/constants.mjs
generated
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
/**
|
||||
* @module constants
|
||||
* @summary Useful constants
|
||||
* @description
|
||||
* Collection of useful date constants.
|
||||
*
|
||||
* The constants could be imported from `date-fns/constants`:
|
||||
*
|
||||
* ```ts
|
||||
* import { maxTime, minTime } from "./constants/date-fns/constants";
|
||||
*
|
||||
* function isAllowedTime(time) {
|
||||
* return time <= maxTime && time >= minTime;
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name daysInWeek
|
||||
* @summary Days in 1 week.
|
||||
*/
|
||||
export const daysInWeek = 7;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name daysInYear
|
||||
* @summary Days in 1 year.
|
||||
*
|
||||
* @description
|
||||
* How many days in a year.
|
||||
*
|
||||
* One years equals 365.2425 days according to the formula:
|
||||
*
|
||||
* > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.
|
||||
* > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
|
||||
*/
|
||||
export const daysInYear = 365.2425;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name maxTime
|
||||
* @summary Maximum allowed time.
|
||||
*
|
||||
* @example
|
||||
* import { maxTime } from "./constants/date-fns/constants";
|
||||
*
|
||||
* const isValid = 8640000000000001 <= maxTime;
|
||||
* //=> false
|
||||
*
|
||||
* new Date(8640000000000001);
|
||||
* //=> Invalid Date
|
||||
*/
|
||||
export const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name minTime
|
||||
* @summary Minimum allowed time.
|
||||
*
|
||||
* @example
|
||||
* import { minTime } from "./constants/date-fns/constants";
|
||||
*
|
||||
* const isValid = -8640000000000001 >= minTime;
|
||||
* //=> false
|
||||
*
|
||||
* new Date(-8640000000000001)
|
||||
* //=> Invalid Date
|
||||
*/
|
||||
export const minTime = -maxTime;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name millisecondsInWeek
|
||||
* @summary Milliseconds in 1 week.
|
||||
*/
|
||||
export const millisecondsInWeek = 604800000;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name millisecondsInDay
|
||||
* @summary Milliseconds in 1 day.
|
||||
*/
|
||||
export const millisecondsInDay = 86400000;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name millisecondsInMinute
|
||||
* @summary Milliseconds in 1 minute
|
||||
*/
|
||||
export const millisecondsInMinute = 60000;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name millisecondsInHour
|
||||
* @summary Milliseconds in 1 hour
|
||||
*/
|
||||
export const millisecondsInHour = 3600000;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name millisecondsInSecond
|
||||
* @summary Milliseconds in 1 second
|
||||
*/
|
||||
export const millisecondsInSecond = 1000;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name minutesInYear
|
||||
* @summary Minutes in 1 year.
|
||||
*/
|
||||
export const minutesInYear = 525600;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name minutesInMonth
|
||||
* @summary Minutes in 1 month.
|
||||
*/
|
||||
export const minutesInMonth = 43200;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name minutesInDay
|
||||
* @summary Minutes in 1 day.
|
||||
*/
|
||||
export const minutesInDay = 1440;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name minutesInHour
|
||||
* @summary Minutes in 1 hour.
|
||||
*/
|
||||
export const minutesInHour = 60;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name monthsInQuarter
|
||||
* @summary Months in 1 quarter.
|
||||
*/
|
||||
export const monthsInQuarter = 3;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name monthsInYear
|
||||
* @summary Months in 1 year.
|
||||
*/
|
||||
export const monthsInYear = 12;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name quartersInYear
|
||||
* @summary Quarters in 1 year
|
||||
*/
|
||||
export const quartersInYear = 4;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name secondsInHour
|
||||
* @summary Seconds in 1 hour.
|
||||
*/
|
||||
export const secondsInHour = 3600;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name secondsInMinute
|
||||
* @summary Seconds in 1 minute.
|
||||
*/
|
||||
export const secondsInMinute = 60;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name secondsInDay
|
||||
* @summary Seconds in 1 day.
|
||||
*/
|
||||
export const secondsInDay = secondsInHour * 24;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name secondsInWeek
|
||||
* @summary Seconds in 1 week.
|
||||
*/
|
||||
export const secondsInWeek = secondsInDay * 7;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name secondsInYear
|
||||
* @summary Seconds in 1 year.
|
||||
*/
|
||||
export const secondsInYear = secondsInDay * daysInYear;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name secondsInMonth
|
||||
* @summary Seconds in 1 month
|
||||
*/
|
||||
export const secondsInMonth = secondsInYear / 12;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @name secondsInQuarter
|
||||
* @summary Seconds in 1 quarter.
|
||||
*/
|
||||
export const secondsInQuarter = secondsInMonth * 3;
|
||||
55
node_modules/date-fns/differenceInBusinessDays.d.mts
generated
vendored
Normal file
55
node_modules/date-fns/differenceInBusinessDays.d.mts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* @name differenceInBusinessDays
|
||||
* @category Day Helpers
|
||||
* @summary Get the number of business days between the given dates.
|
||||
*
|
||||
* @description
|
||||
* Get the number of business day periods between the given dates.
|
||||
* Business days being days that arent in the weekend.
|
||||
* Like `differenceInCalendarDays`, the function removes the times from
|
||||
* the dates before calculating the difference.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param dateLeft - The later date
|
||||
* @param dateRight - The earlier date
|
||||
*
|
||||
* @returns The number of business days
|
||||
*
|
||||
* @example
|
||||
* // How many business days are between
|
||||
* // 10 January 2014 and 20 July 2014?
|
||||
* const result = differenceInBusinessDays(
|
||||
* new Date(2014, 6, 20),
|
||||
* new Date(2014, 0, 10)
|
||||
* )
|
||||
* //=> 136
|
||||
*
|
||||
* // How many business days are between
|
||||
* // 30 November 2021 and 1 November 2021?
|
||||
* const result = differenceInBusinessDays(
|
||||
* new Date(2021, 10, 30),
|
||||
* new Date(2021, 10, 1)
|
||||
* )
|
||||
* //=> 21
|
||||
*
|
||||
* // How many business days are between
|
||||
* // 1 November 2021 and 1 December 2021?
|
||||
* const result = differenceInBusinessDays(
|
||||
* new Date(2021, 10, 1),
|
||||
* new Date(2021, 11, 1)
|
||||
* )
|
||||
* //=> -22
|
||||
*
|
||||
* // How many business days are between
|
||||
* // 1 November 2021 and 1 November 2021 ?
|
||||
* const result = differenceInBusinessDays(
|
||||
* new Date(2021, 10, 1),
|
||||
* new Date(2021, 10, 1)
|
||||
* )
|
||||
* //=> 0
|
||||
*/
|
||||
export declare function differenceInBusinessDays<DateType extends Date>(
|
||||
dateLeft: DateType | number | string,
|
||||
dateRight: DateType | number | string,
|
||||
): number;
|
||||
36
node_modules/date-fns/differenceInCalendarMonths.js
generated
vendored
Normal file
36
node_modules/date-fns/differenceInCalendarMonths.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
exports.differenceInCalendarMonths = differenceInCalendarMonths;
|
||||
var _index = require("./toDate.js");
|
||||
|
||||
/**
|
||||
* @name differenceInCalendarMonths
|
||||
* @category Month Helpers
|
||||
* @summary Get the number of calendar months between the given dates.
|
||||
*
|
||||
* @description
|
||||
* Get the number of calendar months between the given dates.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param dateLeft - The later date
|
||||
* @param dateRight - The earlier date
|
||||
*
|
||||
* @returns The number of calendar months
|
||||
*
|
||||
* @example
|
||||
* // How many calendar months are between 31 January 2014 and 1 September 2014?
|
||||
* const result = differenceInCalendarMonths(
|
||||
* new Date(2014, 8, 1),
|
||||
* new Date(2014, 0, 31)
|
||||
* )
|
||||
* //=> 8
|
||||
*/
|
||||
function differenceInCalendarMonths(dateLeft, dateRight) {
|
||||
const _dateLeft = (0, _index.toDate)(dateLeft);
|
||||
const _dateRight = (0, _index.toDate)(dateRight);
|
||||
|
||||
const yearDiff = _dateLeft.getFullYear() - _dateRight.getFullYear();
|
||||
const monthDiff = _dateLeft.getMonth() - _dateRight.getMonth();
|
||||
|
||||
return yearDiff * 12 + monthDiff;
|
||||
}
|
||||
27
node_modules/date-fns/differenceInCalendarYears.d.ts
generated
vendored
Normal file
27
node_modules/date-fns/differenceInCalendarYears.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @name differenceInCalendarYears
|
||||
* @category Year Helpers
|
||||
* @summary Get the number of calendar years between the given dates.
|
||||
*
|
||||
* @description
|
||||
* Get the number of calendar years between the given dates.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param dateLeft - The later date
|
||||
* @param dateRight - The earlier date
|
||||
|
||||
* @returns The number of calendar years
|
||||
*
|
||||
* @example
|
||||
* // How many calendar years are between 31 December 2013 and 11 February 2015?
|
||||
* const result = differenceInCalendarYears(
|
||||
* new Date(2015, 1, 11),
|
||||
* new Date(2013, 11, 31)
|
||||
* )
|
||||
* //=> 2
|
||||
*/
|
||||
export declare function differenceInCalendarYears<DateType extends Date>(
|
||||
dateLeft: DateType | number | string,
|
||||
dateRight: DateType | number | string,
|
||||
): number;
|
||||
33
node_modules/date-fns/differenceInCalendarYears.js
generated
vendored
Normal file
33
node_modules/date-fns/differenceInCalendarYears.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
exports.differenceInCalendarYears = differenceInCalendarYears;
|
||||
var _index = require("./toDate.js");
|
||||
|
||||
/**
|
||||
* @name differenceInCalendarYears
|
||||
* @category Year Helpers
|
||||
* @summary Get the number of calendar years between the given dates.
|
||||
*
|
||||
* @description
|
||||
* Get the number of calendar years between the given dates.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param dateLeft - The later date
|
||||
* @param dateRight - The earlier date
|
||||
|
||||
* @returns The number of calendar years
|
||||
*
|
||||
* @example
|
||||
* // How many calendar years are between 31 December 2013 and 11 February 2015?
|
||||
* const result = differenceInCalendarYears(
|
||||
* new Date(2015, 1, 11),
|
||||
* new Date(2013, 11, 31)
|
||||
* )
|
||||
* //=> 2
|
||||
*/
|
||||
function differenceInCalendarYears(dateLeft, dateRight) {
|
||||
const _dateLeft = (0, _index.toDate)(dateLeft);
|
||||
const _dateRight = (0, _index.toDate)(dateRight);
|
||||
|
||||
return _dateLeft.getFullYear() - _dateRight.getFullYear();
|
||||
}
|
||||
102
node_modules/date-fns/differenceInDays.mjs
generated
vendored
Normal file
102
node_modules/date-fns/differenceInDays.mjs
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
import { differenceInCalendarDays } from "./differenceInCalendarDays.mjs";
|
||||
import { toDate } from "./toDate.mjs";
|
||||
|
||||
/**
|
||||
* @name differenceInDays
|
||||
* @category Day Helpers
|
||||
* @summary Get the number of full days between the given dates.
|
||||
*
|
||||
* @description
|
||||
* Get the number of full day periods between two dates. Fractional days are
|
||||
* truncated towards zero.
|
||||
*
|
||||
* One "full day" is the distance between a local time in one day to the same
|
||||
* local time on the next or previous day. A full day can sometimes be less than
|
||||
* or more than 24 hours if a daylight savings change happens between two dates.
|
||||
*
|
||||
* To ignore DST and only measure exact 24-hour periods, use this instead:
|
||||
* `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param dateLeft - The later date
|
||||
* @param dateRight - The earlier date
|
||||
*
|
||||
* @returns The number of full days according to the local timezone
|
||||
*
|
||||
* @example
|
||||
* // How many full days are between
|
||||
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
|
||||
* const result = differenceInDays(
|
||||
* new Date(2012, 6, 2, 0, 0),
|
||||
* new Date(2011, 6, 2, 23, 0)
|
||||
* )
|
||||
* //=> 365
|
||||
*
|
||||
* @example
|
||||
* // How many full days are between
|
||||
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
|
||||
* const result = differenceInDays(
|
||||
* new Date(2011, 6, 3, 0, 1),
|
||||
* new Date(2011, 6, 2, 23, 59)
|
||||
* )
|
||||
* //=> 0
|
||||
*
|
||||
* @example
|
||||
* // How many full days are between
|
||||
* // 1 March 2020 0:00 and 1 June 2020 0:00 ?
|
||||
* // Note: because local time is used, the
|
||||
* // result will always be 92 days, even in
|
||||
* // time zones where DST starts and the
|
||||
* // period has only 92*24-1 hours.
|
||||
* const result = differenceInDays(
|
||||
* new Date(2020, 5, 1),
|
||||
* new Date(2020, 2, 1)
|
||||
* )
|
||||
* //=> 92
|
||||
*/
|
||||
export function differenceInDays(dateLeft, dateRight) {
|
||||
const _dateLeft = toDate(dateLeft);
|
||||
const _dateRight = toDate(dateRight);
|
||||
|
||||
const sign = compareLocalAsc(_dateLeft, _dateRight);
|
||||
const difference = Math.abs(differenceInCalendarDays(_dateLeft, _dateRight));
|
||||
|
||||
_dateLeft.setDate(_dateLeft.getDate() - sign * difference);
|
||||
|
||||
// Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full
|
||||
// If so, result must be decreased by 1 in absolute value
|
||||
const isLastDayNotFull = Number(
|
||||
compareLocalAsc(_dateLeft, _dateRight) === -sign,
|
||||
);
|
||||
const result = sign * (difference - isLastDayNotFull);
|
||||
// Prevent negative zero
|
||||
return result === 0 ? 0 : result;
|
||||
}
|
||||
|
||||
// Like `compareAsc` but uses local time not UTC, which is needed
|
||||
// for accurate equality comparisons of UTC timestamps that end up
|
||||
// having the same representation in local time, e.g. one hour before
|
||||
// DST ends vs. the instant that DST ends.
|
||||
function compareLocalAsc(dateLeft, dateRight) {
|
||||
const diff =
|
||||
dateLeft.getFullYear() - dateRight.getFullYear() ||
|
||||
dateLeft.getMonth() - dateRight.getMonth() ||
|
||||
dateLeft.getDate() - dateRight.getDate() ||
|
||||
dateLeft.getHours() - dateRight.getHours() ||
|
||||
dateLeft.getMinutes() - dateRight.getMinutes() ||
|
||||
dateLeft.getSeconds() - dateRight.getSeconds() ||
|
||||
dateLeft.getMilliseconds() - dateRight.getMilliseconds();
|
||||
|
||||
if (diff < 0) {
|
||||
return -1;
|
||||
} else if (diff > 0) {
|
||||
return 1;
|
||||
// Return 0 if diff is 0; return NaN if diff is NaN
|
||||
} else {
|
||||
return diff;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default differenceInDays;
|
||||
40
node_modules/date-fns/differenceInHours.js
generated
vendored
Normal file
40
node_modules/date-fns/differenceInHours.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
exports.differenceInHours = differenceInHours;
|
||||
var _index = require("./_lib/getRoundingMethod.js");
|
||||
var _index2 = require("./constants.js");
|
||||
var _index3 = require("./differenceInMilliseconds.js");
|
||||
|
||||
/**
|
||||
* The {@link differenceInHours} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name differenceInHours
|
||||
* @category Hour Helpers
|
||||
* @summary Get the number of hours between the given dates.
|
||||
*
|
||||
* @description
|
||||
* Get the number of hours between the given dates.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param dateLeft - The later date
|
||||
* @param dateRight - The earlier date
|
||||
* @param options - An object with options.
|
||||
*
|
||||
* @returns The number of hours
|
||||
*
|
||||
* @example
|
||||
* // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?
|
||||
* const result = differenceInHours(
|
||||
* new Date(2014, 6, 2, 19, 0),
|
||||
* new Date(2014, 6, 2, 6, 50)
|
||||
* )
|
||||
* //=> 12
|
||||
*/
|
||||
function differenceInHours(dateLeft, dateRight, options) {
|
||||
const diff =
|
||||
(0, _index3.differenceInMilliseconds)(dateLeft, dateRight) /
|
||||
_index2.millisecondsInHour;
|
||||
return (0, _index.getRoundingMethod)(options?.roundingMethod)(diff);
|
||||
}
|
||||
40
node_modules/date-fns/differenceInHours.mjs
generated
vendored
Normal file
40
node_modules/date-fns/differenceInHours.mjs
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { getRoundingMethod } from "./_lib/getRoundingMethod.mjs";
|
||||
import { millisecondsInHour } from "./constants.mjs";
|
||||
import { differenceInMilliseconds } from "./differenceInMilliseconds.mjs";
|
||||
|
||||
/**
|
||||
* The {@link differenceInHours} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name differenceInHours
|
||||
* @category Hour Helpers
|
||||
* @summary Get the number of hours between the given dates.
|
||||
*
|
||||
* @description
|
||||
* Get the number of hours between the given dates.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param dateLeft - The later date
|
||||
* @param dateRight - The earlier date
|
||||
* @param options - An object with options.
|
||||
*
|
||||
* @returns The number of hours
|
||||
*
|
||||
* @example
|
||||
* // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?
|
||||
* const result = differenceInHours(
|
||||
* new Date(2014, 6, 2, 19, 0),
|
||||
* new Date(2014, 6, 2, 6, 50)
|
||||
* )
|
||||
* //=> 12
|
||||
*/
|
||||
export function differenceInHours(dateLeft, dateRight, options) {
|
||||
const diff =
|
||||
differenceInMilliseconds(dateLeft, dateRight) / millisecondsInHour;
|
||||
return getRoundingMethod(options?.roundingMethod)(diff);
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default differenceInHours;
|
||||
72
node_modules/date-fns/docs/fp.md
generated
vendored
Normal file
72
node_modules/date-fns/docs/fp.md
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
# FP Guide
|
||||
|
||||
**date-fns** v2.x provides [functional programming](https://en.wikipedia.org/wiki/Functional_programming) (FP)
|
||||
friendly functions, like those in [lodash](https://github.com/lodash/lodash/wiki/FP-Guide),
|
||||
that support [currying](https://en.wikipedia.org/wiki/Currying).
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Usage](#usage)
|
||||
|
||||
- [Using Function Composition](#using-function-composition)
|
||||
|
||||
## Usage
|
||||
|
||||
FP functions are provided via `'date-fns/fp'` submodule.
|
||||
|
||||
Functions with options (`format`, `parse`, etc.) have two FP counterparts:
|
||||
one that has the options object as its first argument and one that hasn't.
|
||||
The name of the former has `WithOptions` added to the end of its name.
|
||||
|
||||
In **date-fns'** FP functions, the order of arguments is reversed.
|
||||
|
||||
```javascript
|
||||
import { addYears, formatWithOptions } from "date-fns/fp";
|
||||
import { eo } from "date-fns/locale";
|
||||
import toUpper from "lodash/fp/toUpper"; // 'date-fns/fp' is compatible with 'lodash/fp'!
|
||||
|
||||
// If FP function has not received enough arguments, it returns another function
|
||||
const addFiveYears = addYears(5);
|
||||
|
||||
// Several arguments can be curried at once
|
||||
const dateToString = formatWithOptions({ locale: eo }, "d MMMM yyyy");
|
||||
|
||||
const dates = [
|
||||
new Date(2017, 0 /* Jan */, 1),
|
||||
new Date(2017, 1 /* Feb */, 11),
|
||||
new Date(2017, 6 /* Jul */, 2),
|
||||
];
|
||||
|
||||
const formattedDates = dates.map(addFiveYears).map(dateToString).map(toUpper);
|
||||
//=> ['1 JANUARO 2022', '11 FEBRUARO 2022', '2 JULIO 2022']
|
||||
```
|
||||
|
||||
## Using Function Composition
|
||||
|
||||
The main advantage of FP functions is support of functional-style
|
||||
[function composing](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba).
|
||||
|
||||
In the example above, you can compose `addFiveYears`, `dateToString` and `toUpper` into a single function:
|
||||
|
||||
```javascript
|
||||
const formattedDates = dates.map((date) =>
|
||||
toUpper(dateToString(addFiveYears(date))),
|
||||
);
|
||||
```
|
||||
|
||||
Or you can use `compose` function provided by [lodash](https://lodash.com) to do the same in more idiomatic way:
|
||||
|
||||
```javascript
|
||||
import { compose } from "lodash/fp/compose";
|
||||
|
||||
const formattedDates = dates.map(compose(toUpper, dateToString, addFiveYears));
|
||||
```
|
||||
|
||||
Or if you prefer natural direction of composing (as opposed to the computationally correct order),
|
||||
you can use lodash' `flow` instead:
|
||||
|
||||
```javascript
|
||||
import flow from "lodash/fp/flow";
|
||||
|
||||
const formattedDates = dates.map(flow(addFiveYears, dateToString, toUpper));
|
||||
```
|
||||
1062
node_modules/date-fns/docs/i18nContributionGuide.md
generated
vendored
Normal file
1062
node_modules/date-fns/docs/i18nContributionGuide.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
62
node_modules/date-fns/eachHourOfInterval.js
generated
vendored
Normal file
62
node_modules/date-fns/eachHourOfInterval.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
exports.eachHourOfInterval = eachHourOfInterval;
|
||||
var _index = require("./addHours.js");
|
||||
var _index2 = require("./toDate.js");
|
||||
|
||||
/**
|
||||
* The {@link eachHourOfInterval} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name eachHourOfInterval
|
||||
* @category Interval Helpers
|
||||
* @summary Return the array of hours within the specified time interval.
|
||||
*
|
||||
* @description
|
||||
* Return the array of hours within the specified time interval.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param interval - The interval.
|
||||
* @param options - An object with options.
|
||||
*
|
||||
* @returns The array with starts of hours from the hour of the interval start to the hour of the interval end
|
||||
*
|
||||
* @example
|
||||
* // Each hour between 6 October 2014, 12:00 and 6 October 2014, 15:00
|
||||
* const result = eachHourOfInterval({
|
||||
* start: new Date(2014, 9, 6, 12),
|
||||
* end: new Date(2014, 9, 6, 15)
|
||||
* })
|
||||
* //=> [
|
||||
* // Mon Oct 06 2014 12:00:00,
|
||||
* // Mon Oct 06 2014 13:00:00,
|
||||
* // Mon Oct 06 2014 14:00:00,
|
||||
* // Mon Oct 06 2014 15:00:00
|
||||
* // ]
|
||||
*/
|
||||
function eachHourOfInterval(interval, options) {
|
||||
const startDate = (0, _index2.toDate)(interval.start);
|
||||
const endDate = (0, _index2.toDate)(interval.end);
|
||||
|
||||
let reversed = +startDate > +endDate;
|
||||
const endTime = reversed ? +startDate : +endDate;
|
||||
let currentDate = reversed ? endDate : startDate;
|
||||
currentDate.setMinutes(0, 0, 0);
|
||||
|
||||
let step = options?.step ?? 1;
|
||||
if (!step) return [];
|
||||
if (step < 0) {
|
||||
step = -step;
|
||||
reversed = !reversed;
|
||||
}
|
||||
|
||||
const dates = [];
|
||||
|
||||
while (+currentDate <= endTime) {
|
||||
dates.push((0, _index2.toDate)(currentDate));
|
||||
currentDate = (0, _index.addHours)(currentDate, step);
|
||||
}
|
||||
|
||||
return reversed ? dates.reverse() : dates;
|
||||
}
|
||||
79
node_modules/date-fns/eachWeekOfInterval.js
generated
vendored
Normal file
79
node_modules/date-fns/eachWeekOfInterval.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
"use strict";
|
||||
exports.eachWeekOfInterval = eachWeekOfInterval;
|
||||
var _index = require("./addWeeks.js");
|
||||
var _index2 = require("./startOfWeek.js");
|
||||
var _index3 = require("./toDate.js");
|
||||
|
||||
/**
|
||||
* The {@link eachWeekOfInterval} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name eachWeekOfInterval
|
||||
* @category Interval Helpers
|
||||
* @summary Return the array of weeks within the specified time interval.
|
||||
*
|
||||
* @description
|
||||
* Return the array of weeks within the specified time interval.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param interval - The interval.
|
||||
* @param options - An object with options.
|
||||
*
|
||||
* @returns The array with starts of weeks from the week of the interval start to the week of the interval end
|
||||
*
|
||||
* @example
|
||||
* // Each week within interval 6 October 2014 - 23 November 2014:
|
||||
* const result = eachWeekOfInterval({
|
||||
* start: new Date(2014, 9, 6),
|
||||
* end: new Date(2014, 10, 23)
|
||||
* })
|
||||
* //=> [
|
||||
* // Sun Oct 05 2014 00:00:00,
|
||||
* // Sun Oct 12 2014 00:00:00,
|
||||
* // Sun Oct 19 2014 00:00:00,
|
||||
* // Sun Oct 26 2014 00:00:00,
|
||||
* // Sun Nov 02 2014 00:00:00,
|
||||
* // Sun Nov 09 2014 00:00:00,
|
||||
* // Sun Nov 16 2014 00:00:00,
|
||||
* // Sun Nov 23 2014 00:00:00
|
||||
* // ]
|
||||
*/
|
||||
function eachWeekOfInterval(interval, options) {
|
||||
const startDate = (0, _index3.toDate)(interval.start);
|
||||
const endDate = (0, _index3.toDate)(interval.end);
|
||||
|
||||
let reversed = +startDate > +endDate;
|
||||
const startDateWeek = reversed
|
||||
? (0, _index2.startOfWeek)(endDate, options)
|
||||
: (0, _index2.startOfWeek)(startDate, options);
|
||||
const endDateWeek = reversed
|
||||
? (0, _index2.startOfWeek)(startDate, options)
|
||||
: (0, _index2.startOfWeek)(endDate, options);
|
||||
|
||||
// Some timezones switch DST at midnight, making start of day unreliable in these timezones, 3pm is a safe bet
|
||||
startDateWeek.setHours(15);
|
||||
endDateWeek.setHours(15);
|
||||
|
||||
const endTime = +endDateWeek.getTime();
|
||||
let currentDate = startDateWeek;
|
||||
|
||||
let step = options?.step ?? 1;
|
||||
if (!step) return [];
|
||||
if (step < 0) {
|
||||
step = -step;
|
||||
reversed = !reversed;
|
||||
}
|
||||
|
||||
const dates = [];
|
||||
|
||||
while (+currentDate <= endTime) {
|
||||
currentDate.setHours(0);
|
||||
dates.push((0, _index3.toDate)(currentDate));
|
||||
currentDate = (0, _index.addWeeks)(currentDate, step);
|
||||
currentDate.setHours(15);
|
||||
}
|
||||
|
||||
return reversed ? dates.reverse() : dates;
|
||||
}
|
||||
36
node_modules/date-fns/eachYearOfInterval.d.mts
generated
vendored
Normal file
36
node_modules/date-fns/eachYearOfInterval.d.mts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import type { Interval, StepOptions } from "./types.js";
|
||||
/**
|
||||
* The {@link eachYearOfInterval} function options.
|
||||
*/
|
||||
export interface EachYearOfIntervalOptions extends StepOptions {}
|
||||
/**
|
||||
* @name eachYearOfInterval
|
||||
* @category Interval Helpers
|
||||
* @summary Return the array of yearly timestamps within the specified time interval.
|
||||
*
|
||||
* @description
|
||||
* Return the array of yearly timestamps within the specified time interval.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param interval - The interval.
|
||||
*
|
||||
* @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end
|
||||
*
|
||||
* @example
|
||||
* // Each year between 6 February 2014 and 10 August 2017:
|
||||
* const result = eachYearOfInterval({
|
||||
* start: new Date(2014, 1, 6),
|
||||
* end: new Date(2017, 7, 10)
|
||||
* })
|
||||
* //=> [
|
||||
* // Wed Jan 01 2014 00:00:00,
|
||||
* // Thu Jan 01 2015 00:00:00,
|
||||
* // Fri Jan 01 2016 00:00:00,
|
||||
* // Sun Jan 01 2017 00:00:00
|
||||
* // ]
|
||||
*/
|
||||
export declare function eachYearOfInterval<DateType extends Date>(
|
||||
interval: Interval<DateType>,
|
||||
options?: EachYearOfIntervalOptions,
|
||||
): DateType[];
|
||||
62
node_modules/date-fns/eachYearOfInterval.mjs
generated
vendored
Normal file
62
node_modules/date-fns/eachYearOfInterval.mjs
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import { toDate } from "./toDate.mjs";
|
||||
|
||||
/**
|
||||
* The {@link eachYearOfInterval} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name eachYearOfInterval
|
||||
* @category Interval Helpers
|
||||
* @summary Return the array of yearly timestamps within the specified time interval.
|
||||
*
|
||||
* @description
|
||||
* Return the array of yearly timestamps within the specified time interval.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param interval - The interval.
|
||||
*
|
||||
* @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end
|
||||
*
|
||||
* @example
|
||||
* // Each year between 6 February 2014 and 10 August 2017:
|
||||
* const result = eachYearOfInterval({
|
||||
* start: new Date(2014, 1, 6),
|
||||
* end: new Date(2017, 7, 10)
|
||||
* })
|
||||
* //=> [
|
||||
* // Wed Jan 01 2014 00:00:00,
|
||||
* // Thu Jan 01 2015 00:00:00,
|
||||
* // Fri Jan 01 2016 00:00:00,
|
||||
* // Sun Jan 01 2017 00:00:00
|
||||
* // ]
|
||||
*/
|
||||
export function eachYearOfInterval(interval, options) {
|
||||
const startDate = toDate(interval.start);
|
||||
const endDate = toDate(interval.end);
|
||||
|
||||
let reversed = +startDate > +endDate;
|
||||
const endTime = reversed ? +startDate : +endDate;
|
||||
const currentDate = reversed ? endDate : startDate;
|
||||
currentDate.setHours(0, 0, 0, 0);
|
||||
currentDate.setMonth(0, 1);
|
||||
|
||||
let step = options?.step ?? 1;
|
||||
if (!step) return [];
|
||||
if (step < 0) {
|
||||
step = -step;
|
||||
reversed = !reversed;
|
||||
}
|
||||
|
||||
const dates = [];
|
||||
|
||||
while (+currentDate <= endTime) {
|
||||
dates.push(toDate(currentDate));
|
||||
currentDate.setFullYear(currentDate.getFullYear() + step);
|
||||
}
|
||||
|
||||
return reversed ? dates.reverse() : dates;
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default eachYearOfInterval;
|
||||
25
node_modules/date-fns/endOfISOWeek.d.ts
generated
vendored
Normal file
25
node_modules/date-fns/endOfISOWeek.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @name endOfISOWeek
|
||||
* @category ISO Week Helpers
|
||||
* @summary Return the end of an ISO week for the given date.
|
||||
*
|
||||
* @description
|
||||
* Return the end of an ISO week for the given date.
|
||||
* The result will be in the local timezone.
|
||||
*
|
||||
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The original date
|
||||
*
|
||||
* @returns The end of an ISO week
|
||||
*
|
||||
* @example
|
||||
* // The end of an ISO week for 2 September 2014 11:55:00:
|
||||
* const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
|
||||
* //=> Sun Sep 07 2014 23:59:59.999
|
||||
*/
|
||||
export declare function endOfISOWeek<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
): DateType;
|
||||
32
node_modules/date-fns/endOfMonth.mjs
generated
vendored
Normal file
32
node_modules/date-fns/endOfMonth.mjs
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { toDate } from "./toDate.mjs";
|
||||
|
||||
/**
|
||||
* @name endOfMonth
|
||||
* @category Month Helpers
|
||||
* @summary Return the end of a month for the given date.
|
||||
*
|
||||
* @description
|
||||
* Return the end of a month for the given date.
|
||||
* The result will be in the local timezone.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The original date
|
||||
*
|
||||
* @returns The end of a month
|
||||
*
|
||||
* @example
|
||||
* // The end of a month for 2 September 2014 11:55:00:
|
||||
* const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
|
||||
* //=> Tue Sep 30 2014 23:59:59.999
|
||||
*/
|
||||
export function endOfMonth(date) {
|
||||
const _date = toDate(date);
|
||||
const month = _date.getMonth();
|
||||
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
||||
_date.setHours(23, 59, 59, 999);
|
||||
return _date;
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default endOfMonth;
|
||||
29
node_modules/date-fns/endOfSecond.js
generated
vendored
Normal file
29
node_modules/date-fns/endOfSecond.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
exports.endOfSecond = endOfSecond;
|
||||
var _index = require("./toDate.js");
|
||||
|
||||
/**
|
||||
* @name endOfSecond
|
||||
* @category Second Helpers
|
||||
* @summary Return the end of a second for the given date.
|
||||
*
|
||||
* @description
|
||||
* Return the end of a second for the given date.
|
||||
* The result will be in the local timezone.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The original date
|
||||
*
|
||||
* @returns The end of a second
|
||||
*
|
||||
* @example
|
||||
* // The end of a second for 1 December 2014 22:15:45.400:
|
||||
* const result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
|
||||
* //=> Mon Dec 01 2014 22:15:45.999
|
||||
*/
|
||||
function endOfSecond(date) {
|
||||
const _date = (0, _index.toDate)(date);
|
||||
_date.setMilliseconds(999);
|
||||
return _date;
|
||||
}
|
||||
30
node_modules/date-fns/endOfTomorrow.js
generated
vendored
Normal file
30
node_modules/date-fns/endOfTomorrow.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
exports.endOfTomorrow = endOfTomorrow; /**
|
||||
* @name endOfTomorrow
|
||||
* @category Day Helpers
|
||||
* @summary Return the end of tomorrow.
|
||||
* @pure false
|
||||
*
|
||||
* @description
|
||||
* Return the end of tomorrow.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @returns The end of tomorrow
|
||||
*
|
||||
* @example
|
||||
* // If today is 6 October 2014:
|
||||
* const result = endOfTomorrow()
|
||||
* //=> Tue Oct 7 2014 23:59:59.999
|
||||
*/
|
||||
function endOfTomorrow() {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = now.getMonth();
|
||||
const day = now.getDate();
|
||||
|
||||
const date = new Date(0);
|
||||
date.setFullYear(year, month, day + 1);
|
||||
date.setHours(23, 59, 59, 999);
|
||||
return date;
|
||||
}
|
||||
53
node_modules/date-fns/endOfWeek.js
generated
vendored
Normal file
53
node_modules/date-fns/endOfWeek.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
exports.endOfWeek = endOfWeek;
|
||||
var _index = require("./toDate.js");
|
||||
|
||||
var _index2 = require("./_lib/defaultOptions.js");
|
||||
|
||||
/**
|
||||
* The {@link endOfWeek} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name endOfWeek
|
||||
* @category Week Helpers
|
||||
* @summary Return the end of a week for the given date.
|
||||
*
|
||||
* @description
|
||||
* Return the end of a week for the given date.
|
||||
* The result will be in the local timezone.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The original date
|
||||
* @param options - An object with options
|
||||
*
|
||||
* @returns The end of a week
|
||||
*
|
||||
* @example
|
||||
* // The end of a week for 2 September 2014 11:55:00:
|
||||
* const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))
|
||||
* //=> Sat Sep 06 2014 23:59:59.999
|
||||
*
|
||||
* @example
|
||||
* // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:
|
||||
* const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
|
||||
* //=> Sun Sep 07 2014 23:59:59.999
|
||||
*/
|
||||
function endOfWeek(date, options) {
|
||||
const defaultOptions = (0, _index2.getDefaultOptions)();
|
||||
const weekStartsOn =
|
||||
options?.weekStartsOn ??
|
||||
options?.locale?.options?.weekStartsOn ??
|
||||
defaultOptions.weekStartsOn ??
|
||||
defaultOptions.locale?.options?.weekStartsOn ??
|
||||
0;
|
||||
|
||||
const _date = (0, _index.toDate)(date);
|
||||
const day = _date.getDay();
|
||||
const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
|
||||
|
||||
_date.setDate(_date.getDate() + diff);
|
||||
_date.setHours(23, 59, 59, 999);
|
||||
return _date;
|
||||
}
|
||||
96
node_modules/date-fns/formatDistance.d.mts
generated
vendored
Normal file
96
node_modules/date-fns/formatDistance.d.mts
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
import type { LocalizedOptions } from "./types.js";
|
||||
/**
|
||||
* The {@link formatDistance} function options.
|
||||
*/
|
||||
export interface FormatDistanceOptions
|
||||
extends LocalizedOptions<"formatDistance"> {
|
||||
/** Distances less than a minute are more detailed */
|
||||
includeSeconds?: boolean;
|
||||
/** Add "X ago"/"in X" in the locale language */
|
||||
addSuffix?: boolean;
|
||||
}
|
||||
/**
|
||||
* @name formatDistance
|
||||
* @category Common Helpers
|
||||
* @summary Return the distance between the given dates in words.
|
||||
*
|
||||
* @description
|
||||
* Return the distance between the given dates in words.
|
||||
*
|
||||
* | Distance between dates | Result |
|
||||
* |-------------------------------------------------------------------|---------------------|
|
||||
* | 0 ... 30 secs | less than a minute |
|
||||
* | 30 secs ... 1 min 30 secs | 1 minute |
|
||||
* | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |
|
||||
* | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |
|
||||
* | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |
|
||||
* | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
|
||||
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
|
||||
* | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |
|
||||
* | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |
|
||||
* | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |
|
||||
* | 1 yr ... 1 yr 3 months | about 1 year |
|
||||
* | 1 yr 3 months ... 1 yr 9 month s | over 1 year |
|
||||
* | 1 yr 9 months ... 2 yrs | almost 2 years |
|
||||
* | N yrs ... N yrs 3 months | about N years |
|
||||
* | N yrs 3 months ... N yrs 9 months | over N years |
|
||||
* | N yrs 9 months ... N+1 yrs | almost N+1 years |
|
||||
*
|
||||
* With `options.includeSeconds == true`:
|
||||
* | Distance between dates | Result |
|
||||
* |------------------------|----------------------|
|
||||
* | 0 secs ... 5 secs | less than 5 seconds |
|
||||
* | 5 secs ... 10 secs | less than 10 seconds |
|
||||
* | 10 secs ... 20 secs | less than 20 seconds |
|
||||
* | 20 secs ... 40 secs | half a minute |
|
||||
* | 40 secs ... 60 secs | less than a minute |
|
||||
* | 60 secs ... 90 secs | 1 minute |
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date
|
||||
* @param baseDate - The date to compare with
|
||||
* @param options - An object with options
|
||||
*
|
||||
* @returns The distance in words
|
||||
*
|
||||
* @throws `date` must not be Invalid Date
|
||||
* @throws `baseDate` must not be Invalid Date
|
||||
* @throws `options.locale` must contain `formatDistance` property
|
||||
*
|
||||
* @example
|
||||
* // What is the distance between 2 July 2014 and 1 January 2015?
|
||||
* const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))
|
||||
* //=> '6 months'
|
||||
*
|
||||
* @example
|
||||
* // What is the distance between 1 January 2015 00:00:15
|
||||
* // and 1 January 2015 00:00:00, including seconds?
|
||||
* const result = formatDistance(
|
||||
* new Date(2015, 0, 1, 0, 0, 15),
|
||||
* new Date(2015, 0, 1, 0, 0, 0),
|
||||
* { includeSeconds: true }
|
||||
* )
|
||||
* //=> 'less than 20 seconds'
|
||||
*
|
||||
* @example
|
||||
* // What is the distance from 1 January 2016
|
||||
* // to 1 January 2015, with a suffix?
|
||||
* const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {
|
||||
* addSuffix: true
|
||||
* })
|
||||
* //=> 'about 1 year ago'
|
||||
*
|
||||
* @example
|
||||
* // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?
|
||||
* import { eoLocale } from 'date-fns/locale/eo'
|
||||
* const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {
|
||||
* locale: eoLocale
|
||||
* })
|
||||
* //=> 'pli ol 1 jaro'
|
||||
*/
|
||||
export declare function formatDistance<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
baseDate: DateType | number | string,
|
||||
options?: FormatDistanceOptions,
|
||||
): string;
|
||||
210
node_modules/date-fns/formatDistance.js
generated
vendored
Normal file
210
node_modules/date-fns/formatDistance.js
generated
vendored
Normal file
@@ -0,0 +1,210 @@
|
||||
"use strict";
|
||||
exports.formatDistance = formatDistance;
|
||||
var _index = require("./compareAsc.js");
|
||||
var _index2 = require("./constants.js");
|
||||
var _index3 = require("./differenceInMonths.js");
|
||||
var _index4 = require("./differenceInSeconds.js");
|
||||
var _index5 = require("./toDate.js");
|
||||
|
||||
var _index6 = require("./_lib/defaultLocale.js");
|
||||
var _index7 = require("./_lib/defaultOptions.js");
|
||||
var _index8 = require("./_lib/getTimezoneOffsetInMilliseconds.js");
|
||||
|
||||
/**
|
||||
* The {@link formatDistance} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name formatDistance
|
||||
* @category Common Helpers
|
||||
* @summary Return the distance between the given dates in words.
|
||||
*
|
||||
* @description
|
||||
* Return the distance between the given dates in words.
|
||||
*
|
||||
* | Distance between dates | Result |
|
||||
* |-------------------------------------------------------------------|---------------------|
|
||||
* | 0 ... 30 secs | less than a minute |
|
||||
* | 30 secs ... 1 min 30 secs | 1 minute |
|
||||
* | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |
|
||||
* | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |
|
||||
* | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |
|
||||
* | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
|
||||
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
|
||||
* | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |
|
||||
* | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |
|
||||
* | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |
|
||||
* | 1 yr ... 1 yr 3 months | about 1 year |
|
||||
* | 1 yr 3 months ... 1 yr 9 month s | over 1 year |
|
||||
* | 1 yr 9 months ... 2 yrs | almost 2 years |
|
||||
* | N yrs ... N yrs 3 months | about N years |
|
||||
* | N yrs 3 months ... N yrs 9 months | over N years |
|
||||
* | N yrs 9 months ... N+1 yrs | almost N+1 years |
|
||||
*
|
||||
* With `options.includeSeconds == true`:
|
||||
* | Distance between dates | Result |
|
||||
* |------------------------|----------------------|
|
||||
* | 0 secs ... 5 secs | less than 5 seconds |
|
||||
* | 5 secs ... 10 secs | less than 10 seconds |
|
||||
* | 10 secs ... 20 secs | less than 20 seconds |
|
||||
* | 20 secs ... 40 secs | half a minute |
|
||||
* | 40 secs ... 60 secs | less than a minute |
|
||||
* | 60 secs ... 90 secs | 1 minute |
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date
|
||||
* @param baseDate - The date to compare with
|
||||
* @param options - An object with options
|
||||
*
|
||||
* @returns The distance in words
|
||||
*
|
||||
* @throws `date` must not be Invalid Date
|
||||
* @throws `baseDate` must not be Invalid Date
|
||||
* @throws `options.locale` must contain `formatDistance` property
|
||||
*
|
||||
* @example
|
||||
* // What is the distance between 2 July 2014 and 1 January 2015?
|
||||
* const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))
|
||||
* //=> '6 months'
|
||||
*
|
||||
* @example
|
||||
* // What is the distance between 1 January 2015 00:00:15
|
||||
* // and 1 January 2015 00:00:00, including seconds?
|
||||
* const result = formatDistance(
|
||||
* new Date(2015, 0, 1, 0, 0, 15),
|
||||
* new Date(2015, 0, 1, 0, 0, 0),
|
||||
* { includeSeconds: true }
|
||||
* )
|
||||
* //=> 'less than 20 seconds'
|
||||
*
|
||||
* @example
|
||||
* // What is the distance from 1 January 2016
|
||||
* // to 1 January 2015, with a suffix?
|
||||
* const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {
|
||||
* addSuffix: true
|
||||
* })
|
||||
* //=> 'about 1 year ago'
|
||||
*
|
||||
* @example
|
||||
* // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?
|
||||
* import { eoLocale } from 'date-fns/locale/eo'
|
||||
* const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {
|
||||
* locale: eoLocale
|
||||
* })
|
||||
* //=> 'pli ol 1 jaro'
|
||||
*/
|
||||
|
||||
function formatDistance(date, baseDate, options) {
|
||||
const defaultOptions = (0, _index7.getDefaultOptions)();
|
||||
const locale =
|
||||
options?.locale ?? defaultOptions.locale ?? _index6.defaultLocale;
|
||||
const minutesInAlmostTwoDays = 2520;
|
||||
|
||||
const comparison = (0, _index.compareAsc)(date, baseDate);
|
||||
|
||||
if (isNaN(comparison)) {
|
||||
throw new RangeError("Invalid time value");
|
||||
}
|
||||
|
||||
const localizeOptions = Object.assign({}, options, {
|
||||
addSuffix: options?.addSuffix,
|
||||
comparison: comparison,
|
||||
});
|
||||
|
||||
let dateLeft;
|
||||
let dateRight;
|
||||
if (comparison > 0) {
|
||||
dateLeft = (0, _index5.toDate)(baseDate);
|
||||
dateRight = (0, _index5.toDate)(date);
|
||||
} else {
|
||||
dateLeft = (0, _index5.toDate)(date);
|
||||
dateRight = (0, _index5.toDate)(baseDate);
|
||||
}
|
||||
|
||||
const seconds = (0, _index4.differenceInSeconds)(dateRight, dateLeft);
|
||||
const offsetInSeconds =
|
||||
((0, _index8.getTimezoneOffsetInMilliseconds)(dateRight) -
|
||||
(0, _index8.getTimezoneOffsetInMilliseconds)(dateLeft)) /
|
||||
1000;
|
||||
const minutes = Math.round((seconds - offsetInSeconds) / 60);
|
||||
let months;
|
||||
|
||||
// 0 up to 2 mins
|
||||
if (minutes < 2) {
|
||||
if (options?.includeSeconds) {
|
||||
if (seconds < 5) {
|
||||
return locale.formatDistance("lessThanXSeconds", 5, localizeOptions);
|
||||
} else if (seconds < 10) {
|
||||
return locale.formatDistance("lessThanXSeconds", 10, localizeOptions);
|
||||
} else if (seconds < 20) {
|
||||
return locale.formatDistance("lessThanXSeconds", 20, localizeOptions);
|
||||
} else if (seconds < 40) {
|
||||
return locale.formatDistance("halfAMinute", 0, localizeOptions);
|
||||
} else if (seconds < 60) {
|
||||
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
||||
} else {
|
||||
return locale.formatDistance("xMinutes", 1, localizeOptions);
|
||||
}
|
||||
} else {
|
||||
if (minutes === 0) {
|
||||
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
||||
} else {
|
||||
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
||||
}
|
||||
}
|
||||
|
||||
// 2 mins up to 0.75 hrs
|
||||
} else if (minutes < 45) {
|
||||
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
||||
|
||||
// 0.75 hrs up to 1.5 hrs
|
||||
} else if (minutes < 90) {
|
||||
return locale.formatDistance("aboutXHours", 1, localizeOptions);
|
||||
|
||||
// 1.5 hrs up to 24 hrs
|
||||
} else if (minutes < _index2.minutesInDay) {
|
||||
const hours = Math.round(minutes / 60);
|
||||
return locale.formatDistance("aboutXHours", hours, localizeOptions);
|
||||
|
||||
// 1 day up to 1.75 days
|
||||
} else if (minutes < minutesInAlmostTwoDays) {
|
||||
return locale.formatDistance("xDays", 1, localizeOptions);
|
||||
|
||||
// 1.75 days up to 30 days
|
||||
} else if (minutes < _index2.minutesInMonth) {
|
||||
const days = Math.round(minutes / _index2.minutesInDay);
|
||||
return locale.formatDistance("xDays", days, localizeOptions);
|
||||
|
||||
// 1 month up to 2 months
|
||||
} else if (minutes < _index2.minutesInMonth * 2) {
|
||||
months = Math.round(minutes / _index2.minutesInMonth);
|
||||
return locale.formatDistance("aboutXMonths", months, localizeOptions);
|
||||
}
|
||||
|
||||
months = (0, _index3.differenceInMonths)(dateRight, dateLeft);
|
||||
|
||||
// 2 months up to 12 months
|
||||
if (months < 12) {
|
||||
const nearestMonth = Math.round(minutes / _index2.minutesInMonth);
|
||||
return locale.formatDistance("xMonths", nearestMonth, localizeOptions);
|
||||
|
||||
// 1 year up to max Date
|
||||
} else {
|
||||
const monthsSinceStartOfYear = months % 12;
|
||||
const years = Math.trunc(months / 12);
|
||||
|
||||
// N years up to 1 years 3 months
|
||||
if (monthsSinceStartOfYear < 3) {
|
||||
return locale.formatDistance("aboutXYears", years, localizeOptions);
|
||||
|
||||
// N years 3 months up to N years 9 months
|
||||
} else if (monthsSinceStartOfYear < 9) {
|
||||
return locale.formatDistance("overXYears", years, localizeOptions);
|
||||
|
||||
// N years 9 months up to N year 12 months
|
||||
} else {
|
||||
return locale.formatDistance("almostXYears", years + 1, localizeOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
96
node_modules/date-fns/formatDistanceToNow.mjs
generated
vendored
Normal file
96
node_modules/date-fns/formatDistanceToNow.mjs
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
import { constructNow } from "./constructNow.mjs";
|
||||
import { formatDistance } from "./formatDistance.mjs";
|
||||
|
||||
/**
|
||||
* The {@link formatDistanceToNow} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name formatDistanceToNow
|
||||
* @category Common Helpers
|
||||
* @summary Return the distance between the given date and now in words.
|
||||
* @pure false
|
||||
*
|
||||
* @description
|
||||
* Return the distance between the given date and now in words.
|
||||
*
|
||||
* | Distance to now | Result |
|
||||
* |-------------------------------------------------------------------|---------------------|
|
||||
* | 0 ... 30 secs | less than a minute |
|
||||
* | 30 secs ... 1 min 30 secs | 1 minute |
|
||||
* | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |
|
||||
* | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |
|
||||
* | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |
|
||||
* | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
|
||||
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
|
||||
* | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |
|
||||
* | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |
|
||||
* | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |
|
||||
* | 1 yr ... 1 yr 3 months | about 1 year |
|
||||
* | 1 yr 3 months ... 1 yr 9 month s | over 1 year |
|
||||
* | 1 yr 9 months ... 2 yrs | almost 2 years |
|
||||
* | N yrs ... N yrs 3 months | about N years |
|
||||
* | N yrs 3 months ... N yrs 9 months | over N years |
|
||||
* | N yrs 9 months ... N+1 yrs | almost N+1 years |
|
||||
*
|
||||
* With `options.includeSeconds == true`:
|
||||
* | Distance to now | Result |
|
||||
* |---------------------|----------------------|
|
||||
* | 0 secs ... 5 secs | less than 5 seconds |
|
||||
* | 5 secs ... 10 secs | less than 10 seconds |
|
||||
* | 10 secs ... 20 secs | less than 20 seconds |
|
||||
* | 20 secs ... 40 secs | half a minute |
|
||||
* | 40 secs ... 60 secs | less than a minute |
|
||||
* | 60 secs ... 90 secs | 1 minute |
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The given date
|
||||
* @param options - The object with options
|
||||
*
|
||||
* @returns The distance in words
|
||||
*
|
||||
* @throws `date` must not be Invalid Date
|
||||
* @throws `options.locale` must contain `formatDistance` property
|
||||
*
|
||||
* @example
|
||||
* // If today is 1 January 2015, what is the distance to 2 July 2014?
|
||||
* const result = formatDistanceToNow(
|
||||
* new Date(2014, 6, 2)
|
||||
* )
|
||||
* //=> '6 months'
|
||||
*
|
||||
* @example
|
||||
* // If now is 1 January 2015 00:00:00,
|
||||
* // what is the distance to 1 January 2015 00:00:15, including seconds?
|
||||
* const result = formatDistanceToNow(
|
||||
* new Date(2015, 0, 1, 0, 0, 15),
|
||||
* {includeSeconds: true}
|
||||
* )
|
||||
* //=> 'less than 20 seconds'
|
||||
*
|
||||
* @example
|
||||
* // If today is 1 January 2015,
|
||||
* // what is the distance to 1 January 2016, with a suffix?
|
||||
* const result = formatDistanceToNow(
|
||||
* new Date(2016, 0, 1),
|
||||
* {addSuffix: true}
|
||||
* )
|
||||
* //=> 'in about 1 year'
|
||||
*
|
||||
* @example
|
||||
* // If today is 1 January 2015,
|
||||
* // what is the distance to 1 August 2016 in Esperanto?
|
||||
* const eoLocale = require('date-fns/locale/eo')
|
||||
* const result = formatDistanceToNow(
|
||||
* new Date(2016, 7, 1),
|
||||
* {locale: eoLocale}
|
||||
* )
|
||||
* //=> 'pli ol 1 jaro'
|
||||
*/
|
||||
export function formatDistanceToNow(date, options) {
|
||||
return formatDistance(date, constructNow(date), options);
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default formatDistanceToNow;
|
||||
105
node_modules/date-fns/formatDuration.js
generated
vendored
Normal file
105
node_modules/date-fns/formatDuration.js
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
"use strict";
|
||||
exports.formatDuration = formatDuration;
|
||||
|
||||
var _index = require("./_lib/defaultLocale.js");
|
||||
var _index2 = require("./_lib/defaultOptions.js");
|
||||
|
||||
/**
|
||||
* The {@link formatDuration} function options.
|
||||
*/
|
||||
|
||||
const defaultFormat = [
|
||||
"years",
|
||||
"months",
|
||||
"weeks",
|
||||
"days",
|
||||
"hours",
|
||||
"minutes",
|
||||
"seconds",
|
||||
];
|
||||
|
||||
/**
|
||||
* @name formatDuration
|
||||
* @category Common Helpers
|
||||
* @summary Formats a duration in human-readable format
|
||||
*
|
||||
* @description
|
||||
* Return human-readable duration string i.e. "9 months 2 days"
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param duration - The duration to format
|
||||
* @param options - An object with options.
|
||||
*
|
||||
* @returns The formatted date string
|
||||
*
|
||||
* @example
|
||||
* // Format full duration
|
||||
* formatDuration({
|
||||
* years: 2,
|
||||
* months: 9,
|
||||
* weeks: 1,
|
||||
* days: 7,
|
||||
* hours: 5,
|
||||
* minutes: 9,
|
||||
* seconds: 30
|
||||
* })
|
||||
* //=> '2 years 9 months 1 week 7 days 5 hours 9 minutes 30 seconds'
|
||||
*
|
||||
* @example
|
||||
* // Format partial duration
|
||||
* formatDuration({ months: 9, days: 2 })
|
||||
* //=> '9 months 2 days'
|
||||
*
|
||||
* @example
|
||||
* // Customize the format
|
||||
* formatDuration(
|
||||
* {
|
||||
* years: 2,
|
||||
* months: 9,
|
||||
* weeks: 1,
|
||||
* days: 7,
|
||||
* hours: 5,
|
||||
* minutes: 9,
|
||||
* seconds: 30
|
||||
* },
|
||||
* { format: ['months', 'weeks'] }
|
||||
* ) === '9 months 1 week'
|
||||
*
|
||||
* @example
|
||||
* // Customize the zeros presence
|
||||
* formatDuration({ years: 0, months: 9 })
|
||||
* //=> '9 months'
|
||||
* formatDuration({ years: 0, months: 9 }, { zero: true })
|
||||
* //=> '0 years 9 months'
|
||||
*
|
||||
* @example
|
||||
* // Customize the delimiter
|
||||
* formatDuration({ years: 2, months: 9, weeks: 3 }, { delimiter: ', ' })
|
||||
* //=> '2 years, 9 months, 3 weeks'
|
||||
*/
|
||||
function formatDuration(duration, options) {
|
||||
const defaultOptions = (0, _index2.getDefaultOptions)();
|
||||
const locale =
|
||||
options?.locale ?? defaultOptions.locale ?? _index.defaultLocale;
|
||||
const format = options?.format ?? defaultFormat;
|
||||
const zero = options?.zero ?? false;
|
||||
const delimiter = options?.delimiter ?? " ";
|
||||
|
||||
if (!locale.formatDistance) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const result = format
|
||||
.reduce((acc, unit) => {
|
||||
const token = `x${unit.replace(/(^.)/, (m) => m.toUpperCase())}`;
|
||||
const value = duration[unit];
|
||||
if (value !== undefined && (zero || duration[unit])) {
|
||||
return acc.concat(locale.formatDistance(token, value));
|
||||
}
|
||||
return acc;
|
||||
}, [])
|
||||
.join(delimiter);
|
||||
|
||||
return result;
|
||||
}
|
||||
88
node_modules/date-fns/formatISO9075.mjs
generated
vendored
Normal file
88
node_modules/date-fns/formatISO9075.mjs
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
import { isValid } from "./isValid.mjs";
|
||||
import { toDate } from "./toDate.mjs";
|
||||
import { addLeadingZeros } from "./_lib/addLeadingZeros.mjs";
|
||||
|
||||
/**
|
||||
* The {@link formatISO9075} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name formatISO9075
|
||||
* @category Common Helpers
|
||||
* @summary Format the date according to the ISO 9075 standard (https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_get-format).
|
||||
*
|
||||
* @description
|
||||
* Return the formatted date string in ISO 9075 format. Options may be passed to control the parts and notations of the date.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The original date
|
||||
* @param options - An object with options.
|
||||
*
|
||||
* @returns The formatted date string
|
||||
*
|
||||
* @throws `date` must not be Invalid Date
|
||||
*
|
||||
* @example
|
||||
* // Represent 18 September 2019 in ISO 9075 format:
|
||||
* const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52))
|
||||
* //=> '2019-09-18 19:00:52'
|
||||
*
|
||||
* @example
|
||||
* // Represent 18 September 2019 in ISO 9075, short format:
|
||||
* const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' })
|
||||
* //=> '20190918 190052'
|
||||
*
|
||||
* @example
|
||||
* // Represent 18 September 2019 in ISO 9075 format, date only:
|
||||
* const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' })
|
||||
* //=> '2019-09-18'
|
||||
*
|
||||
* @example
|
||||
* // Represent 18 September 2019 in ISO 9075 format, time only:
|
||||
* const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' })
|
||||
* //=> '19:00:52'
|
||||
*/
|
||||
export function formatISO9075(date, options) {
|
||||
const _date = toDate(date);
|
||||
|
||||
if (!isValid(_date)) {
|
||||
throw new RangeError("Invalid time value");
|
||||
}
|
||||
|
||||
const format = options?.format ?? "extended";
|
||||
const representation = options?.representation ?? "complete";
|
||||
|
||||
let result = "";
|
||||
|
||||
const dateDelimiter = format === "extended" ? "-" : "";
|
||||
const timeDelimiter = format === "extended" ? ":" : "";
|
||||
|
||||
// Representation is either 'date' or 'complete'
|
||||
if (representation !== "time") {
|
||||
const day = addLeadingZeros(_date.getDate(), 2);
|
||||
const month = addLeadingZeros(_date.getMonth() + 1, 2);
|
||||
const year = addLeadingZeros(_date.getFullYear(), 4);
|
||||
|
||||
// yyyyMMdd or yyyy-MM-dd.
|
||||
result = `${year}${dateDelimiter}${month}${dateDelimiter}${day}`;
|
||||
}
|
||||
|
||||
// Representation is either 'time' or 'complete'
|
||||
if (representation !== "date") {
|
||||
const hour = addLeadingZeros(_date.getHours(), 2);
|
||||
const minute = addLeadingZeros(_date.getMinutes(), 2);
|
||||
const second = addLeadingZeros(_date.getSeconds(), 2);
|
||||
|
||||
// If there's also date, separate it with time with a space
|
||||
const separator = result === "" ? "" : " ";
|
||||
|
||||
// HHmmss or HH:mm:ss.
|
||||
result = `${result}${separator}${hour}${timeDelimiter}${minute}${timeDelimiter}${second}`;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default formatISO9075;
|
||||
64
node_modules/date-fns/formatRFC7231.js
generated
vendored
Normal file
64
node_modules/date-fns/formatRFC7231.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
exports.formatRFC7231 = formatRFC7231;
|
||||
var _index = require("./isValid.js");
|
||||
var _index2 = require("./toDate.js");
|
||||
var _index3 = require("./_lib/addLeadingZeros.js");
|
||||
|
||||
const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
||||
|
||||
const months = [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec",
|
||||
];
|
||||
|
||||
/**
|
||||
* @name formatRFC7231
|
||||
* @category Common Helpers
|
||||
* @summary Format the date according to the RFC 7231 standard (https://tools.ietf.org/html/rfc7231#section-7.1.1.1).
|
||||
*
|
||||
* @description
|
||||
* Return the formatted date string in RFC 7231 format.
|
||||
* The result will always be in UTC timezone.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The original date
|
||||
*
|
||||
* @returns The formatted date string
|
||||
*
|
||||
* @throws `date` must not be Invalid Date
|
||||
*
|
||||
* @example
|
||||
* // Represent 18 September 2019 in RFC 7231 format:
|
||||
* const result = formatRFC7231(new Date(2019, 8, 18, 19, 0, 52))
|
||||
* //=> 'Wed, 18 Sep 2019 19:00:52 GMT'
|
||||
*/
|
||||
function formatRFC7231(date) {
|
||||
const _date = (0, _index2.toDate)(date);
|
||||
|
||||
if (!(0, _index.isValid)(_date)) {
|
||||
throw new RangeError("Invalid time value");
|
||||
}
|
||||
|
||||
const dayName = days[_date.getUTCDay()];
|
||||
const dayOfMonth = (0, _index3.addLeadingZeros)(_date.getUTCDate(), 2);
|
||||
const monthName = months[_date.getUTCMonth()];
|
||||
const year = _date.getUTCFullYear();
|
||||
|
||||
const hour = (0, _index3.addLeadingZeros)(_date.getUTCHours(), 2);
|
||||
const minute = (0, _index3.addLeadingZeros)(_date.getUTCMinutes(), 2);
|
||||
const second = (0, _index3.addLeadingZeros)(_date.getUTCSeconds(), 2);
|
||||
|
||||
// Result variables.
|
||||
return `${dayName}, ${dayOfMonth} ${monthName} ${year} ${hour}:${minute}:${second} GMT`;
|
||||
}
|
||||
50
node_modules/date-fns/formatRelative.d.ts
generated
vendored
Normal file
50
node_modules/date-fns/formatRelative.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import type { LocalizedOptions, WeekOptions } from "./types.js";
|
||||
/**
|
||||
* The {@link formatRelative} function options.
|
||||
*/
|
||||
export interface FormatRelativeOptions
|
||||
extends LocalizedOptions<
|
||||
"options" | "localize" | "formatLong" | "formatRelative"
|
||||
>,
|
||||
WeekOptions {}
|
||||
/**
|
||||
* @name formatRelative
|
||||
* @category Common Helpers
|
||||
* @summary Represent the date in words relative to the given base date.
|
||||
*
|
||||
* @description
|
||||
* Represent the date in words relative to the given base date.
|
||||
*
|
||||
* | Distance to the base date | Result |
|
||||
* |---------------------------|---------------------------|
|
||||
* | Previous 6 days | last Sunday at 04:30 AM |
|
||||
* | Last day | yesterday at 04:30 AM |
|
||||
* | Same day | today at 04:30 AM |
|
||||
* | Next day | tomorrow at 04:30 AM |
|
||||
* | Next 6 days | Sunday at 04:30 AM |
|
||||
* | Other | 12/31/2017 |
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to format
|
||||
* @param baseDate - The date to compare with
|
||||
* @param options - An object with options
|
||||
*
|
||||
* @returns The date in words
|
||||
*
|
||||
* @throws `date` must not be Invalid Date
|
||||
* @throws `baseDate` must not be Invalid Date
|
||||
* @throws `options.locale` must contain `localize` property
|
||||
* @throws `options.locale` must contain `formatLong` property
|
||||
* @throws `options.locale` must contain `formatRelative` property
|
||||
*
|
||||
* @example
|
||||
* // Represent the date of 6 days ago in words relative to the given base date. In this example, today is Wednesday
|
||||
* const result = formatRelative(subDays(new Date(), 6), new Date())
|
||||
* //=> "last Thursday at 12:45 AM"
|
||||
*/
|
||||
export declare function formatRelative<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
baseDate: DateType | number | string,
|
||||
options?: FormatRelativeOptions,
|
||||
): string;
|
||||
5
node_modules/date-fns/fp/addDays.d.ts
generated
vendored
Normal file
5
node_modules/date-fns/fp/addDays.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const addDays: import("./types.js").FPFn2<
|
||||
Date,
|
||||
number,
|
||||
string | number | Date
|
||||
>;
|
||||
8
node_modules/date-fns/fp/addQuarters.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/addQuarters.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { addQuarters as fn } from "../addQuarters.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const addQuarters = convertToFP(fn, 2);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default addQuarters;
|
||||
3
node_modules/date-fns/fp/cdn.min.js
generated
vendored
Normal file
3
node_modules/date-fns/fp/cdn.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/date-fns/fp/clamp.d.ts
generated
vendored
Normal file
5
node_modules/date-fns/fp/clamp.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const clamp: import("./types.js").FPFn2<
|
||||
Date,
|
||||
import("../fp.js").Interval<Date>,
|
||||
string | number | Date
|
||||
>;
|
||||
8
node_modules/date-fns/fp/compareDesc.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/compareDesc.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { compareDesc as fn } from "../compareDesc.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const compareDesc = convertToFP(fn, 2);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default compareDesc;
|
||||
5
node_modules/date-fns/fp/constructFrom.d.mts
generated
vendored
Normal file
5
node_modules/date-fns/fp/constructFrom.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const constructFrom: import("./types.js").FPFn2<
|
||||
Date,
|
||||
string | number | Date,
|
||||
string | number | Date
|
||||
>;
|
||||
5
node_modules/date-fns/fp/differenceInCalendarDays.d.ts
generated
vendored
Normal file
5
node_modules/date-fns/fp/differenceInCalendarDays.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const differenceInCalendarDays: import("./types.js").FPFn2<
|
||||
number,
|
||||
string | number | Date,
|
||||
string | number | Date
|
||||
>;
|
||||
8
node_modules/date-fns/fp/differenceInCalendarDays.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/differenceInCalendarDays.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { differenceInCalendarDays as fn } from "../differenceInCalendarDays.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const differenceInCalendarDays = convertToFP(fn, 2);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default differenceInCalendarDays;
|
||||
8
node_modules/date-fns/fp/differenceInDays.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/differenceInDays.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { differenceInDays as fn } from "../differenceInDays.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const differenceInDays = convertToFP(fn, 2);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default differenceInDays;
|
||||
8
node_modules/date-fns/fp/differenceInHoursWithOptions.js
generated
vendored
Normal file
8
node_modules/date-fns/fp/differenceInHoursWithOptions.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
exports.differenceInHoursWithOptions = void 0;
|
||||
|
||||
var _index = require("../differenceInHours.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const differenceInHoursWithOptions = (exports.differenceInHoursWithOptions = (0,
|
||||
_index2.convertToFP)(_index.differenceInHours, 3));
|
||||
5
node_modules/date-fns/fp/differenceInMinutes.d.ts
generated
vendored
Normal file
5
node_modules/date-fns/fp/differenceInMinutes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const differenceInMinutes: import("./types.js").FPFn2<
|
||||
number,
|
||||
string | number | Date,
|
||||
string | number | Date
|
||||
>;
|
||||
5
node_modules/date-fns/fp/differenceInMonths.d.ts
generated
vendored
Normal file
5
node_modules/date-fns/fp/differenceInMonths.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const differenceInMonths: import("./types.js").FPFn2<
|
||||
number,
|
||||
string | number | Date,
|
||||
string | number | Date
|
||||
>;
|
||||
5
node_modules/date-fns/fp/differenceInQuarters.d.ts
generated
vendored
Normal file
5
node_modules/date-fns/fp/differenceInQuarters.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const differenceInQuarters: import("./types.js").FPFn2<
|
||||
number,
|
||||
string | number | Date,
|
||||
string | number | Date
|
||||
>;
|
||||
8
node_modules/date-fns/fp/differenceInSecondsWithOptions.js
generated
vendored
Normal file
8
node_modules/date-fns/fp/differenceInSecondsWithOptions.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
exports.differenceInSecondsWithOptions = void 0;
|
||||
|
||||
var _index = require("../differenceInSeconds.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const differenceInSecondsWithOptions = (exports.differenceInSecondsWithOptions =
|
||||
(0, _index2.convertToFP)(_index.differenceInSeconds, 3));
|
||||
8
node_modules/date-fns/fp/eachHourOfInterval.js
generated
vendored
Normal file
8
node_modules/date-fns/fp/eachHourOfInterval.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
exports.eachHourOfInterval = void 0;
|
||||
|
||||
var _index = require("../eachHourOfInterval.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const eachHourOfInterval = (exports.eachHourOfInterval = (0,
|
||||
_index2.convertToFP)(_index.eachHourOfInterval, 1));
|
||||
4
node_modules/date-fns/fp/eachWeekendOfMonth.d.mts
generated
vendored
Normal file
4
node_modules/date-fns/fp/eachWeekendOfMonth.d.mts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const eachWeekendOfMonth: import("./types.js").FPFn1<
|
||||
Date[],
|
||||
Date
|
||||
>;
|
||||
5
node_modules/date-fns/fp/eachYearOfIntervalWithOptions.d.mts
generated
vendored
Normal file
5
node_modules/date-fns/fp/eachYearOfIntervalWithOptions.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const eachYearOfIntervalWithOptions: import("./types.js").FPFn2<
|
||||
Date[],
|
||||
import("../eachYearOfInterval.js").EachYearOfIntervalOptions | undefined,
|
||||
import("../fp.js").Interval<Date>
|
||||
>;
|
||||
10
node_modules/date-fns/fp/endOfMinute.js
generated
vendored
Normal file
10
node_modules/date-fns/fp/endOfMinute.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
exports.endOfMinute = void 0;
|
||||
|
||||
var _index = require("../endOfMinute.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const endOfMinute = (exports.endOfMinute = (0, _index2.convertToFP)(
|
||||
_index.endOfMinute,
|
||||
1,
|
||||
));
|
||||
4
node_modules/date-fns/fp/endOfSecond.d.ts
generated
vendored
Normal file
4
node_modules/date-fns/fp/endOfSecond.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const endOfSecond: import("./types.js").FPFn1<
|
||||
Date,
|
||||
string | number | Date
|
||||
>;
|
||||
10
node_modules/date-fns/fp/endOfYear.js
generated
vendored
Normal file
10
node_modules/date-fns/fp/endOfYear.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
exports.endOfYear = void 0;
|
||||
|
||||
var _index = require("../endOfYear.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const endOfYear = (exports.endOfYear = (0, _index2.convertToFP)(
|
||||
_index.endOfYear,
|
||||
1,
|
||||
));
|
||||
8
node_modules/date-fns/fp/endOfYear.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/endOfYear.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { endOfYear as fn } from "../endOfYear.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const endOfYear = convertToFP(fn, 1);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default endOfYear;
|
||||
5
node_modules/date-fns/fp/formatDistance.d.ts
generated
vendored
Normal file
5
node_modules/date-fns/fp/formatDistance.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const formatDistance: import("./types.js").FPFn2<
|
||||
string,
|
||||
string | number | Date,
|
||||
string | number | Date
|
||||
>;
|
||||
4
node_modules/date-fns/fp/formatDuration.d.mts
generated
vendored
Normal file
4
node_modules/date-fns/fp/formatDuration.d.mts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const formatDuration: import("./types.js").FPFn1<
|
||||
string,
|
||||
import("../fp.js").Duration
|
||||
>;
|
||||
5
node_modules/date-fns/fp/formatDurationWithOptions.d.mts
generated
vendored
Normal file
5
node_modules/date-fns/fp/formatDurationWithOptions.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const formatDurationWithOptions: import("./types.js").FPFn2<
|
||||
string,
|
||||
import("../formatDuration.js").FormatDurationOptions | undefined,
|
||||
import("../fp.js").Duration
|
||||
>;
|
||||
5
node_modules/date-fns/fp/formatISO9075WithOptions.d.mts
generated
vendored
Normal file
5
node_modules/date-fns/fp/formatISO9075WithOptions.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const formatISO9075WithOptions: import("./types.js").FPFn2<
|
||||
string,
|
||||
import("../formatISO9075.js").FormatISO9075Options | undefined,
|
||||
string | number | Date
|
||||
>;
|
||||
4
node_modules/date-fns/fp/formatISODuration.d.mts
generated
vendored
Normal file
4
node_modules/date-fns/fp/formatISODuration.d.mts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const formatISODuration: import("./types.js").FPFn1<
|
||||
string,
|
||||
import("../fp.js").Duration
|
||||
>;
|
||||
10
node_modules/date-fns/fp/formatISODuration.js
generated
vendored
Normal file
10
node_modules/date-fns/fp/formatISODuration.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
exports.formatISODuration = void 0;
|
||||
|
||||
var _index = require("../formatISODuration.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const formatISODuration = (exports.formatISODuration = (0, _index2.convertToFP)(
|
||||
_index.formatISODuration,
|
||||
1,
|
||||
));
|
||||
10
node_modules/date-fns/fp/formatRFC3339.js
generated
vendored
Normal file
10
node_modules/date-fns/fp/formatRFC3339.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
exports.formatRFC3339 = void 0;
|
||||
|
||||
var _index = require("../formatRFC3339.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const formatRFC3339 = (exports.formatRFC3339 = (0, _index2.convertToFP)(
|
||||
_index.formatRFC3339,
|
||||
1,
|
||||
));
|
||||
5
node_modules/date-fns/fp/formatRFC3339WithOptions.d.mts
generated
vendored
Normal file
5
node_modules/date-fns/fp/formatRFC3339WithOptions.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const formatRFC3339WithOptions: import("./types.js").FPFn2<
|
||||
string,
|
||||
import("../formatRFC3339.js").FormatRFC3339Options | undefined,
|
||||
string | number | Date
|
||||
>;
|
||||
6
node_modules/date-fns/fp/formatRelativeWithOptions.d.ts
generated
vendored
Normal file
6
node_modules/date-fns/fp/formatRelativeWithOptions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare const formatRelativeWithOptions: import("./types.js").FPFn3<
|
||||
string,
|
||||
import("../formatRelative.js").FormatRelativeOptions | undefined,
|
||||
string | number | Date,
|
||||
string | number | Date
|
||||
>;
|
||||
4
node_modules/date-fns/fp/getDate.d.ts
generated
vendored
Normal file
4
node_modules/date-fns/fp/getDate.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const getDate: import("./types.js").FPFn1<
|
||||
number,
|
||||
string | number | Date
|
||||
>;
|
||||
8
node_modules/date-fns/fp/getDaysInYear.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/getDaysInYear.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { getDaysInYear as fn } from "../getDaysInYear.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const getDaysInYear = convertToFP(fn, 1);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default getDaysInYear;
|
||||
4
node_modules/date-fns/fp/getDecade.d.ts
generated
vendored
Normal file
4
node_modules/date-fns/fp/getDecade.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const getDecade: import("./types.js").FPFn1<
|
||||
number,
|
||||
string | number | Date
|
||||
>;
|
||||
10
node_modules/date-fns/fp/getHours.js
generated
vendored
Normal file
10
node_modules/date-fns/fp/getHours.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
exports.getHours = void 0;
|
||||
|
||||
var _index = require("../getHours.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const getHours = (exports.getHours = (0, _index2.convertToFP)(
|
||||
_index.getHours,
|
||||
1,
|
||||
));
|
||||
8
node_modules/date-fns/fp/getOverlappingDaysInIntervals.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/getOverlappingDaysInIntervals.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { getOverlappingDaysInIntervals as fn } from "../getOverlappingDaysInIntervals.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const getOverlappingDaysInIntervals = convertToFP(fn, 2);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default getOverlappingDaysInIntervals;
|
||||
10
node_modules/date-fns/fp/getQuarter.js
generated
vendored
Normal file
10
node_modules/date-fns/fp/getQuarter.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
exports.getQuarter = void 0;
|
||||
|
||||
var _index = require("../getQuarter.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const getQuarter = (exports.getQuarter = (0, _index2.convertToFP)(
|
||||
_index.getQuarter,
|
||||
1,
|
||||
));
|
||||
4
node_modules/date-fns/fp/getWeek.d.mts
generated
vendored
Normal file
4
node_modules/date-fns/fp/getWeek.d.mts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const getWeek: import("./types.js").FPFn1<
|
||||
number,
|
||||
string | number | Date
|
||||
>;
|
||||
5
node_modules/date-fns/fp/getWeekOfMonthWithOptions.d.mts
generated
vendored
Normal file
5
node_modules/date-fns/fp/getWeekOfMonthWithOptions.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const getWeekOfMonthWithOptions: import("./types.js").FPFn2<
|
||||
number,
|
||||
import("../getWeekOfMonth.js").GetWeekOfMonthOptions | undefined,
|
||||
string | number | Date
|
||||
>;
|
||||
8
node_modules/date-fns/fp/getWeekYearWithOptions.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/getWeekYearWithOptions.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { getWeekYear as fn } from "../getWeekYear.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const getWeekYearWithOptions = convertToFP(fn, 2);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default getWeekYearWithOptions;
|
||||
4
node_modules/date-fns/fp/getWeeksInMonth.d.mts
generated
vendored
Normal file
4
node_modules/date-fns/fp/getWeeksInMonth.d.mts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const getWeeksInMonth: import("./types.js").FPFn1<
|
||||
number,
|
||||
string | number | Date
|
||||
>;
|
||||
8
node_modules/date-fns/fp/intlFormatDistanceWithOptions.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/intlFormatDistanceWithOptions.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { intlFormatDistance as fn } from "../intlFormatDistance.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const intlFormatDistanceWithOptions = convertToFP(fn, 3);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default intlFormatDistanceWithOptions;
|
||||
8
node_modules/date-fns/fp/isSameWeek.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/isSameWeek.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { isSameWeek as fn } from "../isSameWeek.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const isSameWeek = convertToFP(fn, 2);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default isSameWeek;
|
||||
10
node_modules/date-fns/fp/isSameYear.js
generated
vendored
Normal file
10
node_modules/date-fns/fp/isSameYear.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
exports.isSameYear = void 0;
|
||||
|
||||
var _index = require("../isSameYear.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const isSameYear = (exports.isSameYear = (0, _index2.convertToFP)(
|
||||
_index.isSameYear,
|
||||
2,
|
||||
));
|
||||
4
node_modules/date-fns/fp/isSunday.d.ts
generated
vendored
Normal file
4
node_modules/date-fns/fp/isSunday.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const isSunday: import("./types.js").FPFn1<
|
||||
boolean,
|
||||
string | number | Date
|
||||
>;
|
||||
4
node_modules/date-fns/fp/lastDayOfISOWeek.d.ts
generated
vendored
Normal file
4
node_modules/date-fns/fp/lastDayOfISOWeek.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const lastDayOfISOWeek: import("./types.js").FPFn1<
|
||||
Date,
|
||||
string | number | Date
|
||||
>;
|
||||
4
node_modules/date-fns/fp/lastDayOfISOWeekYear.d.ts
generated
vendored
Normal file
4
node_modules/date-fns/fp/lastDayOfISOWeekYear.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const lastDayOfISOWeekYear: import("./types.js").FPFn1<
|
||||
Date,
|
||||
string | number | Date
|
||||
>;
|
||||
8
node_modules/date-fns/fp/lastDayOfWeek.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/lastDayOfWeek.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { lastDayOfWeek as fn } from "../lastDayOfWeek.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const lastDayOfWeek = convertToFP(fn, 1);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default lastDayOfWeek;
|
||||
8
node_modules/date-fns/fp/lastDayOfWeekWithOptions.js
generated
vendored
Normal file
8
node_modules/date-fns/fp/lastDayOfWeekWithOptions.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
exports.lastDayOfWeekWithOptions = void 0;
|
||||
|
||||
var _index = require("../lastDayOfWeek.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const lastDayOfWeekWithOptions = (exports.lastDayOfWeekWithOptions = (0,
|
||||
_index2.convertToFP)(_index.lastDayOfWeek, 2));
|
||||
5
node_modules/date-fns/fp/lightFormat.d.mts
generated
vendored
Normal file
5
node_modules/date-fns/fp/lightFormat.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const lightFormat: import("./types.js").FPFn2<
|
||||
string,
|
||||
string,
|
||||
string | number | Date
|
||||
>;
|
||||
8
node_modules/date-fns/fp/milliseconds.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/milliseconds.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { milliseconds as fn } from "../milliseconds.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const milliseconds = convertToFP(fn, 1);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default milliseconds;
|
||||
4
node_modules/date-fns/fp/millisecondsToHours.d.mts
generated
vendored
Normal file
4
node_modules/date-fns/fp/millisecondsToHours.d.mts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const millisecondsToHours: import("./types.js").FPFn1<
|
||||
number,
|
||||
number
|
||||
>;
|
||||
8
node_modules/date-fns/fp/millisecondsToMinutes.js
generated
vendored
Normal file
8
node_modules/date-fns/fp/millisecondsToMinutes.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
exports.millisecondsToMinutes = void 0;
|
||||
|
||||
var _index = require("../millisecondsToMinutes.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const millisecondsToMinutes = (exports.millisecondsToMinutes = (0,
|
||||
_index2.convertToFP)(_index.millisecondsToMinutes, 1));
|
||||
8
node_modules/date-fns/fp/minutesToSeconds.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/minutesToSeconds.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { minutesToSeconds as fn } from "../minutesToSeconds.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const minutesToSeconds = convertToFP(fn, 1);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default minutesToSeconds;
|
||||
4
node_modules/date-fns/fp/nextSaturday.d.mts
generated
vendored
Normal file
4
node_modules/date-fns/fp/nextSaturday.d.mts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const nextSaturday: import("./types.js").FPFn1<
|
||||
Date,
|
||||
string | number | Date
|
||||
>;
|
||||
10
node_modules/date-fns/fp/parseISO.js
generated
vendored
Normal file
10
node_modules/date-fns/fp/parseISO.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
exports.parseISO = void 0;
|
||||
|
||||
var _index = require("../parseISO.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const parseISO = (exports.parseISO = (0, _index2.convertToFP)(
|
||||
_index.parseISO,
|
||||
1,
|
||||
));
|
||||
8
node_modules/date-fns/fp/parseISO.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/parseISO.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { parseISO as fn } from "../parseISO.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const parseISO = convertToFP(fn, 1);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default parseISO;
|
||||
8
node_modules/date-fns/fp/previousFriday.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/previousFriday.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { previousFriday as fn } from "../previousFriday.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const previousFriday = convertToFP(fn, 1);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default previousFriday;
|
||||
4
node_modules/date-fns/fp/previousSaturday.d.mts
generated
vendored
Normal file
4
node_modules/date-fns/fp/previousSaturday.d.mts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const previousSaturday: import("./types.js").FPFn1<
|
||||
Date,
|
||||
string | number | Date
|
||||
>;
|
||||
10
node_modules/date-fns/fp/previousWednesday.js
generated
vendored
Normal file
10
node_modules/date-fns/fp/previousWednesday.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
exports.previousWednesday = void 0;
|
||||
|
||||
var _index = require("../previousWednesday.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const previousWednesday = (exports.previousWednesday = (0, _index2.convertToFP)(
|
||||
_index.previousWednesday,
|
||||
1,
|
||||
));
|
||||
11
node_modules/date-fns/fp/roundToNearestMinutesWithOptions.js
generated
vendored
Normal file
11
node_modules/date-fns/fp/roundToNearestMinutesWithOptions.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
exports.roundToNearestMinutesWithOptions = void 0;
|
||||
|
||||
var _index = require("../roundToNearestMinutes.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const roundToNearestMinutesWithOptions =
|
||||
(exports.roundToNearestMinutesWithOptions = (0, _index2.convertToFP)(
|
||||
_index.roundToNearestMinutes,
|
||||
2,
|
||||
));
|
||||
4
node_modules/date-fns/fp/secondsToMilliseconds.d.mts
generated
vendored
Normal file
4
node_modules/date-fns/fp/secondsToMilliseconds.d.mts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const secondsToMilliseconds: import("./types.js").FPFn1<
|
||||
number,
|
||||
number
|
||||
>;
|
||||
8
node_modules/date-fns/fp/secondsToMilliseconds.js
generated
vendored
Normal file
8
node_modules/date-fns/fp/secondsToMilliseconds.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
exports.secondsToMilliseconds = void 0;
|
||||
|
||||
var _index = require("../secondsToMilliseconds.js");
|
||||
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
|
||||
const secondsToMilliseconds = (exports.secondsToMilliseconds = (0,
|
||||
_index2.convertToFP)(_index.secondsToMilliseconds, 1));
|
||||
8
node_modules/date-fns/fp/setDayOfYear.mjs
generated
vendored
Normal file
8
node_modules/date-fns/fp/setDayOfYear.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
||||
import { setDayOfYear as fn } from "../setDayOfYear.mjs";
|
||||
import { convertToFP } from "./_lib/convertToFP.mjs";
|
||||
|
||||
export const setDayOfYear = convertToFP(fn, 2);
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default setDayOfYear;
|
||||
5
node_modules/date-fns/fp/setISOWeek.d.mts
generated
vendored
Normal file
5
node_modules/date-fns/fp/setISOWeek.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const setISOWeek: import("./types.js").FPFn2<
|
||||
Date,
|
||||
number,
|
||||
string | number | Date
|
||||
>;
|
||||
4
node_modules/date-fns/fp/startOfMinute.d.ts
generated
vendored
Normal file
4
node_modules/date-fns/fp/startOfMinute.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const startOfMinute: import("./types.js").FPFn1<
|
||||
Date,
|
||||
string | number | Date
|
||||
>;
|
||||
4
node_modules/date-fns/fp/startOfQuarter.d.ts
generated
vendored
Normal file
4
node_modules/date-fns/fp/startOfQuarter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const startOfQuarter: import("./types.js").FPFn1<
|
||||
Date,
|
||||
string | number | Date
|
||||
>;
|
||||
4
node_modules/date-fns/fp/startOfSecond.d.ts
generated
vendored
Normal file
4
node_modules/date-fns/fp/startOfSecond.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const startOfSecond: import("./types.js").FPFn1<
|
||||
Date,
|
||||
string | number | Date
|
||||
>;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user