Spaces:
Configuration error
Configuration error
luigi12345
commited on
Commit
•
2fe7289
1
Parent(s):
cc95b79
c1e42c37811b45c0ee5afd0872884c85015e374f3d617c93d74b039ad0e35538
Browse files- workers1/auto3d/node_modules/date-fns/startOfWeekYear.js +64 -0
- workers1/auto3d/node_modules/date-fns/startOfWeekYear.mjs +64 -0
- workers1/auto3d/node_modules/date-fns/startOfYear.d.mts +23 -0
- workers1/auto3d/node_modules/date-fns/startOfYear.d.ts +23 -0
- workers1/auto3d/node_modules/date-fns/startOfYear.js +32 -0
- workers1/auto3d/node_modules/date-fns/startOfYear.mjs +33 -0
- workers1/auto3d/node_modules/date-fns/startOfYesterday.d.mts +17 -0
- workers1/auto3d/node_modules/date-fns/startOfYesterday.d.ts +17 -0
- workers1/auto3d/node_modules/date-fns/startOfYesterday.js +28 -0
- workers1/auto3d/node_modules/date-fns/startOfYesterday.mjs +30 -0
- workers1/auto3d/node_modules/date-fns/sub.d.mts +45 -0
- workers1/auto3d/node_modules/date-fns/sub.d.ts +45 -0
- workers1/auto3d/node_modules/date-fns/sub.js +78 -0
- workers1/auto3d/node_modules/date-fns/sub.mjs +72 -0
- workers1/auto3d/node_modules/date-fns/subBusinessDays.d.mts +24 -0
- workers1/auto3d/node_modules/date-fns/subBusinessDays.d.ts +24 -0
- workers1/auto3d/node_modules/date-fns/subBusinessDays.js +27 -0
- workers1/auto3d/node_modules/date-fns/subBusinessDays.mjs +28 -0
- workers1/auto3d/node_modules/date-fns/subDays.d.mts +24 -0
- workers1/auto3d/node_modules/date-fns/subDays.d.ts +24 -0
- workers1/auto3d/node_modules/date-fns/subDays.js +27 -0
- workers1/auto3d/node_modules/date-fns/subDays.mjs +28 -0
- workers1/auto3d/node_modules/date-fns/subHours.d.mts +24 -0
- workers1/auto3d/node_modules/date-fns/subHours.d.ts +24 -0
- workers1/auto3d/node_modules/date-fns/subHours.js +27 -0
- workers1/auto3d/node_modules/date-fns/subHours.mjs +28 -0
- workers1/auto3d/node_modules/date-fns/subISOWeekYears.d.mts +26 -0
- workers1/auto3d/node_modules/date-fns/subISOWeekYears.d.ts +26 -0
- workers1/auto3d/node_modules/date-fns/subISOWeekYears.js +29 -0
- workers1/auto3d/node_modules/date-fns/subISOWeekYears.mjs +30 -0
- workers1/auto3d/node_modules/date-fns/subMilliseconds.d.mts +24 -0
- workers1/auto3d/node_modules/date-fns/subMilliseconds.d.ts +24 -0
- workers1/auto3d/node_modules/date-fns/subMilliseconds.js +27 -0
- workers1/auto3d/node_modules/date-fns/subMilliseconds.mjs +28 -0
- workers1/auto3d/node_modules/date-fns/subMinutes.d.mts +24 -0
- workers1/auto3d/node_modules/date-fns/subMinutes.d.ts +24 -0
- workers1/auto3d/node_modules/date-fns/subMinutes.js +27 -0
- workers1/auto3d/node_modules/date-fns/subMinutes.mjs +28 -0
- workers1/auto3d/node_modules/date-fns/subMonths.d.mts +24 -0
- workers1/auto3d/node_modules/date-fns/subMonths.d.ts +24 -0
- workers1/auto3d/node_modules/date-fns/subMonths.js +27 -0
- workers1/auto3d/node_modules/date-fns/subMonths.mjs +28 -0
- workers1/auto3d/node_modules/date-fns/subQuarters.d.mts +24 -0
- workers1/auto3d/node_modules/date-fns/subQuarters.d.ts +24 -0
- workers1/auto3d/node_modules/date-fns/subQuarters.js +27 -0
- workers1/auto3d/node_modules/date-fns/subQuarters.mjs +28 -0
- workers1/auto3d/node_modules/date-fns/subSeconds.d.mts +24 -0
- workers1/auto3d/node_modules/date-fns/subSeconds.d.ts +24 -0
- workers1/auto3d/node_modules/date-fns/subSeconds.js +27 -0
- workers1/auto3d/node_modules/date-fns/subSeconds.mjs +28 -0
workers1/auto3d/node_modules/date-fns/startOfWeekYear.js
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.startOfWeekYear = startOfWeekYear;
|
3 |
+
var _index = require("./constructFrom.js");
|
4 |
+
var _index2 = require("./getWeekYear.js");
|
5 |
+
var _index3 = require("./startOfWeek.js");
|
6 |
+
|
7 |
+
var _index4 = require("./_lib/defaultOptions.js");
|
8 |
+
|
9 |
+
/**
|
10 |
+
* The {@link startOfWeekYear} function options.
|
11 |
+
*/
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @name startOfWeekYear
|
15 |
+
* @category Week-Numbering Year Helpers
|
16 |
+
* @summary Return the start of a local week-numbering year for the given date.
|
17 |
+
*
|
18 |
+
* @description
|
19 |
+
* Return the start of a local week-numbering year.
|
20 |
+
* The exact calculation depends on the values of
|
21 |
+
* `options.weekStartsOn` (which is the index of the first day of the week)
|
22 |
+
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
|
23 |
+
* the first week of the week-numbering year)
|
24 |
+
*
|
25 |
+
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
|
26 |
+
*
|
27 |
+
* @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).
|
28 |
+
*
|
29 |
+
* @param date - The original date
|
30 |
+
* @param options - An object with options
|
31 |
+
*
|
32 |
+
* @returns The start of a week-numbering year
|
33 |
+
*
|
34 |
+
* @example
|
35 |
+
* // The start of an a week-numbering year for 2 July 2005 with default settings:
|
36 |
+
* const result = startOfWeekYear(new Date(2005, 6, 2))
|
37 |
+
* //=> Sun Dec 26 2004 00:00:00
|
38 |
+
*
|
39 |
+
* @example
|
40 |
+
* // The start of a week-numbering year for 2 July 2005
|
41 |
+
* // if Monday is the first day of week
|
42 |
+
* // and 4 January is always in the first week of the year:
|
43 |
+
* const result = startOfWeekYear(new Date(2005, 6, 2), {
|
44 |
+
* weekStartsOn: 1,
|
45 |
+
* firstWeekContainsDate: 4
|
46 |
+
* })
|
47 |
+
* //=> Mon Jan 03 2005 00:00:00
|
48 |
+
*/
|
49 |
+
function startOfWeekYear(date, options) {
|
50 |
+
const defaultOptions = (0, _index4.getDefaultOptions)();
|
51 |
+
const firstWeekContainsDate =
|
52 |
+
options?.firstWeekContainsDate ??
|
53 |
+
options?.locale?.options?.firstWeekContainsDate ??
|
54 |
+
defaultOptions.firstWeekContainsDate ??
|
55 |
+
defaultOptions.locale?.options?.firstWeekContainsDate ??
|
56 |
+
1;
|
57 |
+
|
58 |
+
const year = (0, _index2.getWeekYear)(date, options);
|
59 |
+
const firstWeek = (0, _index.constructFrom)(date, 0);
|
60 |
+
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
61 |
+
firstWeek.setHours(0, 0, 0, 0);
|
62 |
+
const _date = (0, _index3.startOfWeek)(firstWeek, options);
|
63 |
+
return _date;
|
64 |
+
}
|
workers1/auto3d/node_modules/date-fns/startOfWeekYear.mjs
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { constructFrom } from "./constructFrom.mjs";
|
2 |
+
import { getWeekYear } from "./getWeekYear.mjs";
|
3 |
+
import { startOfWeek } from "./startOfWeek.mjs";
|
4 |
+
import { getDefaultOptions } from "./_lib/defaultOptions.mjs";
|
5 |
+
|
6 |
+
/**
|
7 |
+
* The {@link startOfWeekYear} function options.
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @name startOfWeekYear
|
12 |
+
* @category Week-Numbering Year Helpers
|
13 |
+
* @summary Return the start of a local week-numbering year for the given date.
|
14 |
+
*
|
15 |
+
* @description
|
16 |
+
* Return the start of a local week-numbering year.
|
17 |
+
* The exact calculation depends on the values of
|
18 |
+
* `options.weekStartsOn` (which is the index of the first day of the week)
|
19 |
+
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
|
20 |
+
* the first week of the week-numbering year)
|
21 |
+
*
|
22 |
+
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
|
23 |
+
*
|
24 |
+
* @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).
|
25 |
+
*
|
26 |
+
* @param date - The original date
|
27 |
+
* @param options - An object with options
|
28 |
+
*
|
29 |
+
* @returns The start of a week-numbering year
|
30 |
+
*
|
31 |
+
* @example
|
32 |
+
* // The start of an a week-numbering year for 2 July 2005 with default settings:
|
33 |
+
* const result = startOfWeekYear(new Date(2005, 6, 2))
|
34 |
+
* //=> Sun Dec 26 2004 00:00:00
|
35 |
+
*
|
36 |
+
* @example
|
37 |
+
* // The start of a week-numbering year for 2 July 2005
|
38 |
+
* // if Monday is the first day of week
|
39 |
+
* // and 4 January is always in the first week of the year:
|
40 |
+
* const result = startOfWeekYear(new Date(2005, 6, 2), {
|
41 |
+
* weekStartsOn: 1,
|
42 |
+
* firstWeekContainsDate: 4
|
43 |
+
* })
|
44 |
+
* //=> Mon Jan 03 2005 00:00:00
|
45 |
+
*/
|
46 |
+
export function startOfWeekYear(date, options) {
|
47 |
+
const defaultOptions = getDefaultOptions();
|
48 |
+
const firstWeekContainsDate =
|
49 |
+
options?.firstWeekContainsDate ??
|
50 |
+
options?.locale?.options?.firstWeekContainsDate ??
|
51 |
+
defaultOptions.firstWeekContainsDate ??
|
52 |
+
defaultOptions.locale?.options?.firstWeekContainsDate ??
|
53 |
+
1;
|
54 |
+
|
55 |
+
const year = getWeekYear(date, options);
|
56 |
+
const firstWeek = constructFrom(date, 0);
|
57 |
+
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
58 |
+
firstWeek.setHours(0, 0, 0, 0);
|
59 |
+
const _date = startOfWeek(firstWeek, options);
|
60 |
+
return _date;
|
61 |
+
}
|
62 |
+
|
63 |
+
// Fallback for modularized imports:
|
64 |
+
export default startOfWeekYear;
|
workers1/auto3d/node_modules/date-fns/startOfYear.d.mts
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name startOfYear
|
3 |
+
* @category Year Helpers
|
4 |
+
* @summary Return the start of a year for the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Return the start of a year for the given date.
|
8 |
+
* The result will be in the local timezone.
|
9 |
+
*
|
10 |
+
* @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).
|
11 |
+
*
|
12 |
+
* @param date - The original date
|
13 |
+
*
|
14 |
+
* @returns The start of a year
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // The start of a year for 2 September 2014 11:55:00:
|
18 |
+
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
19 |
+
* //=> Wed Jan 01 2014 00:00:00
|
20 |
+
*/
|
21 |
+
export declare function startOfYear<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/startOfYear.d.ts
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name startOfYear
|
3 |
+
* @category Year Helpers
|
4 |
+
* @summary Return the start of a year for the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Return the start of a year for the given date.
|
8 |
+
* The result will be in the local timezone.
|
9 |
+
*
|
10 |
+
* @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).
|
11 |
+
*
|
12 |
+
* @param date - The original date
|
13 |
+
*
|
14 |
+
* @returns The start of a year
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // The start of a year for 2 September 2014 11:55:00:
|
18 |
+
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
19 |
+
* //=> Wed Jan 01 2014 00:00:00
|
20 |
+
*/
|
21 |
+
export declare function startOfYear<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/startOfYear.js
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.startOfYear = startOfYear;
|
3 |
+
var _index = require("./toDate.js");
|
4 |
+
var _index2 = require("./constructFrom.js");
|
5 |
+
|
6 |
+
/**
|
7 |
+
* @name startOfYear
|
8 |
+
* @category Year Helpers
|
9 |
+
* @summary Return the start of a year for the given date.
|
10 |
+
*
|
11 |
+
* @description
|
12 |
+
* Return the start of a year for the given date.
|
13 |
+
* The result will be in the local timezone.
|
14 |
+
*
|
15 |
+
* @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).
|
16 |
+
*
|
17 |
+
* @param date - The original date
|
18 |
+
*
|
19 |
+
* @returns The start of a year
|
20 |
+
*
|
21 |
+
* @example
|
22 |
+
* // The start of a year for 2 September 2014 11:55:00:
|
23 |
+
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
24 |
+
* //=> Wed Jan 01 2014 00:00:00
|
25 |
+
*/
|
26 |
+
function startOfYear(date) {
|
27 |
+
const cleanDate = (0, _index.toDate)(date);
|
28 |
+
const _date = (0, _index2.constructFrom)(date, 0);
|
29 |
+
_date.setFullYear(cleanDate.getFullYear(), 0, 1);
|
30 |
+
_date.setHours(0, 0, 0, 0);
|
31 |
+
return _date;
|
32 |
+
}
|
workers1/auto3d/node_modules/date-fns/startOfYear.mjs
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { toDate } from "./toDate.mjs";
|
2 |
+
import { constructFrom } from "./constructFrom.mjs";
|
3 |
+
|
4 |
+
/**
|
5 |
+
* @name startOfYear
|
6 |
+
* @category Year Helpers
|
7 |
+
* @summary Return the start of a year for the given date.
|
8 |
+
*
|
9 |
+
* @description
|
10 |
+
* Return the start of a year for the given date.
|
11 |
+
* The result will be in the local timezone.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The original date
|
16 |
+
*
|
17 |
+
* @returns The start of a year
|
18 |
+
*
|
19 |
+
* @example
|
20 |
+
* // The start of a year for 2 September 2014 11:55:00:
|
21 |
+
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
22 |
+
* //=> Wed Jan 01 2014 00:00:00
|
23 |
+
*/
|
24 |
+
export function startOfYear(date) {
|
25 |
+
const cleanDate = toDate(date);
|
26 |
+
const _date = constructFrom(date, 0);
|
27 |
+
_date.setFullYear(cleanDate.getFullYear(), 0, 1);
|
28 |
+
_date.setHours(0, 0, 0, 0);
|
29 |
+
return _date;
|
30 |
+
}
|
31 |
+
|
32 |
+
// Fallback for modularized imports:
|
33 |
+
export default startOfYear;
|
workers1/auto3d/node_modules/date-fns/startOfYesterday.d.mts
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name startOfYesterday
|
3 |
+
* @category Day Helpers
|
4 |
+
* @summary Return the start of yesterday.
|
5 |
+
* @pure false
|
6 |
+
*
|
7 |
+
* @description
|
8 |
+
* Return the start of yesterday.
|
9 |
+
*
|
10 |
+
* @returns The start of yesterday
|
11 |
+
*
|
12 |
+
* @example
|
13 |
+
* // If today is 6 October 2014:
|
14 |
+
* const result = startOfYesterday()
|
15 |
+
* //=> Sun Oct 5 2014 00:00:00
|
16 |
+
*/
|
17 |
+
export declare function startOfYesterday(): Date;
|
workers1/auto3d/node_modules/date-fns/startOfYesterday.d.ts
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name startOfYesterday
|
3 |
+
* @category Day Helpers
|
4 |
+
* @summary Return the start of yesterday.
|
5 |
+
* @pure false
|
6 |
+
*
|
7 |
+
* @description
|
8 |
+
* Return the start of yesterday.
|
9 |
+
*
|
10 |
+
* @returns The start of yesterday
|
11 |
+
*
|
12 |
+
* @example
|
13 |
+
* // If today is 6 October 2014:
|
14 |
+
* const result = startOfYesterday()
|
15 |
+
* //=> Sun Oct 5 2014 00:00:00
|
16 |
+
*/
|
17 |
+
export declare function startOfYesterday(): Date;
|
workers1/auto3d/node_modules/date-fns/startOfYesterday.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.startOfYesterday = startOfYesterday; /**
|
3 |
+
* @name startOfYesterday
|
4 |
+
* @category Day Helpers
|
5 |
+
* @summary Return the start of yesterday.
|
6 |
+
* @pure false
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Return the start of yesterday.
|
10 |
+
*
|
11 |
+
* @returns The start of yesterday
|
12 |
+
*
|
13 |
+
* @example
|
14 |
+
* // If today is 6 October 2014:
|
15 |
+
* const result = startOfYesterday()
|
16 |
+
* //=> Sun Oct 5 2014 00:00:00
|
17 |
+
*/
|
18 |
+
function startOfYesterday() {
|
19 |
+
const now = new Date();
|
20 |
+
const year = now.getFullYear();
|
21 |
+
const month = now.getMonth();
|
22 |
+
const day = now.getDate();
|
23 |
+
|
24 |
+
const date = new Date(0);
|
25 |
+
date.setFullYear(year, month, day - 1);
|
26 |
+
date.setHours(0, 0, 0, 0);
|
27 |
+
return date;
|
28 |
+
}
|
workers1/auto3d/node_modules/date-fns/startOfYesterday.mjs
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name startOfYesterday
|
3 |
+
* @category Day Helpers
|
4 |
+
* @summary Return the start of yesterday.
|
5 |
+
* @pure false
|
6 |
+
*
|
7 |
+
* @description
|
8 |
+
* Return the start of yesterday.
|
9 |
+
*
|
10 |
+
* @returns The start of yesterday
|
11 |
+
*
|
12 |
+
* @example
|
13 |
+
* // If today is 6 October 2014:
|
14 |
+
* const result = startOfYesterday()
|
15 |
+
* //=> Sun Oct 5 2014 00:00:00
|
16 |
+
*/
|
17 |
+
export function startOfYesterday() {
|
18 |
+
const now = new Date();
|
19 |
+
const year = now.getFullYear();
|
20 |
+
const month = now.getMonth();
|
21 |
+
const day = now.getDate();
|
22 |
+
|
23 |
+
const date = new Date(0);
|
24 |
+
date.setFullYear(year, month, day - 1);
|
25 |
+
date.setHours(0, 0, 0, 0);
|
26 |
+
return date;
|
27 |
+
}
|
28 |
+
|
29 |
+
// Fallback for modularized imports:
|
30 |
+
export default startOfYesterday;
|
workers1/auto3d/node_modules/date-fns/sub.d.mts
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import type { Duration } from "./types.js";
|
2 |
+
/**
|
3 |
+
* @name sub
|
4 |
+
* @category Common Helpers
|
5 |
+
* @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.
|
6 |
+
*
|
7 |
+
* @description
|
8 |
+
* Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.
|
9 |
+
*
|
10 |
+
* @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).
|
11 |
+
*
|
12 |
+
* @param date - The date to be changed
|
13 |
+
* @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted
|
14 |
+
*
|
15 |
+
* | Key | Description |
|
16 |
+
* |---------|------------------------------------|
|
17 |
+
* | years | Amount of years to be subtracted |
|
18 |
+
* | months | Amount of months to be subtracted |
|
19 |
+
* | weeks | Amount of weeks to be subtracted |
|
20 |
+
* | days | Amount of days to be subtracted |
|
21 |
+
* | hours | Amount of hours to be subtracted |
|
22 |
+
* | minutes | Amount of minutes to be subtracted |
|
23 |
+
* | seconds | Amount of seconds to be subtracted |
|
24 |
+
*
|
25 |
+
* All values default to 0
|
26 |
+
*
|
27 |
+
* @returns The new date with the seconds subtracted
|
28 |
+
*
|
29 |
+
* @example
|
30 |
+
* // Subtract the following duration from 15 June 2017 15:29:20
|
31 |
+
* const result = sub(new Date(2017, 5, 15, 15, 29, 20), {
|
32 |
+
* years: 2,
|
33 |
+
* months: 9,
|
34 |
+
* weeks: 1,
|
35 |
+
* days: 7,
|
36 |
+
* hours: 5,
|
37 |
+
* minutes: 9,
|
38 |
+
* seconds: 30
|
39 |
+
* })
|
40 |
+
* //=> Mon Sep 1 2014 10:19:50
|
41 |
+
*/
|
42 |
+
export declare function sub<DateType extends Date>(
|
43 |
+
date: DateType | number | string,
|
44 |
+
duration: Duration,
|
45 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/sub.d.ts
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import type { Duration } from "./types.js";
|
2 |
+
/**
|
3 |
+
* @name sub
|
4 |
+
* @category Common Helpers
|
5 |
+
* @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.
|
6 |
+
*
|
7 |
+
* @description
|
8 |
+
* Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.
|
9 |
+
*
|
10 |
+
* @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).
|
11 |
+
*
|
12 |
+
* @param date - The date to be changed
|
13 |
+
* @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted
|
14 |
+
*
|
15 |
+
* | Key | Description |
|
16 |
+
* |---------|------------------------------------|
|
17 |
+
* | years | Amount of years to be subtracted |
|
18 |
+
* | months | Amount of months to be subtracted |
|
19 |
+
* | weeks | Amount of weeks to be subtracted |
|
20 |
+
* | days | Amount of days to be subtracted |
|
21 |
+
* | hours | Amount of hours to be subtracted |
|
22 |
+
* | minutes | Amount of minutes to be subtracted |
|
23 |
+
* | seconds | Amount of seconds to be subtracted |
|
24 |
+
*
|
25 |
+
* All values default to 0
|
26 |
+
*
|
27 |
+
* @returns The new date with the seconds subtracted
|
28 |
+
*
|
29 |
+
* @example
|
30 |
+
* // Subtract the following duration from 15 June 2017 15:29:20
|
31 |
+
* const result = sub(new Date(2017, 5, 15, 15, 29, 20), {
|
32 |
+
* years: 2,
|
33 |
+
* months: 9,
|
34 |
+
* weeks: 1,
|
35 |
+
* days: 7,
|
36 |
+
* hours: 5,
|
37 |
+
* minutes: 9,
|
38 |
+
* seconds: 30
|
39 |
+
* })
|
40 |
+
* //=> Mon Sep 1 2014 10:19:50
|
41 |
+
*/
|
42 |
+
export declare function sub<DateType extends Date>(
|
43 |
+
date: DateType | number | string,
|
44 |
+
duration: Duration,
|
45 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/sub.js
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.sub = sub;
|
3 |
+
var _index = require("./subDays.js");
|
4 |
+
var _index2 = require("./subMonths.js");
|
5 |
+
|
6 |
+
var _index3 = require("./constructFrom.js");
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @name sub
|
10 |
+
* @category Common Helpers
|
11 |
+
* @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.
|
12 |
+
*
|
13 |
+
* @description
|
14 |
+
* Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.
|
15 |
+
*
|
16 |
+
* @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).
|
17 |
+
*
|
18 |
+
* @param date - The date to be changed
|
19 |
+
* @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted
|
20 |
+
*
|
21 |
+
* | Key | Description |
|
22 |
+
* |---------|------------------------------------|
|
23 |
+
* | years | Amount of years to be subtracted |
|
24 |
+
* | months | Amount of months to be subtracted |
|
25 |
+
* | weeks | Amount of weeks to be subtracted |
|
26 |
+
* | days | Amount of days to be subtracted |
|
27 |
+
* | hours | Amount of hours to be subtracted |
|
28 |
+
* | minutes | Amount of minutes to be subtracted |
|
29 |
+
* | seconds | Amount of seconds to be subtracted |
|
30 |
+
*
|
31 |
+
* All values default to 0
|
32 |
+
*
|
33 |
+
* @returns The new date with the seconds subtracted
|
34 |
+
*
|
35 |
+
* @example
|
36 |
+
* // Subtract the following duration from 15 June 2017 15:29:20
|
37 |
+
* const result = sub(new Date(2017, 5, 15, 15, 29, 20), {
|
38 |
+
* years: 2,
|
39 |
+
* months: 9,
|
40 |
+
* weeks: 1,
|
41 |
+
* days: 7,
|
42 |
+
* hours: 5,
|
43 |
+
* minutes: 9,
|
44 |
+
* seconds: 30
|
45 |
+
* })
|
46 |
+
* //=> Mon Sep 1 2014 10:19:50
|
47 |
+
*/
|
48 |
+
function sub(date, duration) {
|
49 |
+
const {
|
50 |
+
years = 0,
|
51 |
+
months = 0,
|
52 |
+
weeks = 0,
|
53 |
+
days = 0,
|
54 |
+
hours = 0,
|
55 |
+
minutes = 0,
|
56 |
+
seconds = 0,
|
57 |
+
} = duration;
|
58 |
+
|
59 |
+
// Subtract years and months
|
60 |
+
const dateWithoutMonths = (0, _index2.subMonths)(date, months + years * 12);
|
61 |
+
|
62 |
+
// Subtract weeks and days
|
63 |
+
const dateWithoutDays = (0, _index.subDays)(
|
64 |
+
dateWithoutMonths,
|
65 |
+
days + weeks * 7,
|
66 |
+
);
|
67 |
+
|
68 |
+
// Subtract hours, minutes and seconds
|
69 |
+
const minutestoSub = minutes + hours * 60;
|
70 |
+
const secondstoSub = seconds + minutestoSub * 60;
|
71 |
+
const mstoSub = secondstoSub * 1000;
|
72 |
+
const finalDate = (0, _index3.constructFrom)(
|
73 |
+
date,
|
74 |
+
dateWithoutDays.getTime() - mstoSub,
|
75 |
+
);
|
76 |
+
|
77 |
+
return finalDate;
|
78 |
+
}
|
workers1/auto3d/node_modules/date-fns/sub.mjs
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { subDays } from "./subDays.mjs";
|
2 |
+
import { subMonths } from "./subMonths.mjs";
|
3 |
+
import { constructFrom } from "./constructFrom.mjs";
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name sub
|
7 |
+
* @category Common Helpers
|
8 |
+
* @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted
|
17 |
+
*
|
18 |
+
* | Key | Description |
|
19 |
+
* |---------|------------------------------------|
|
20 |
+
* | years | Amount of years to be subtracted |
|
21 |
+
* | months | Amount of months to be subtracted |
|
22 |
+
* | weeks | Amount of weeks to be subtracted |
|
23 |
+
* | days | Amount of days to be subtracted |
|
24 |
+
* | hours | Amount of hours to be subtracted |
|
25 |
+
* | minutes | Amount of minutes to be subtracted |
|
26 |
+
* | seconds | Amount of seconds to be subtracted |
|
27 |
+
*
|
28 |
+
* All values default to 0
|
29 |
+
*
|
30 |
+
* @returns The new date with the seconds subtracted
|
31 |
+
*
|
32 |
+
* @example
|
33 |
+
* // Subtract the following duration from 15 June 2017 15:29:20
|
34 |
+
* const result = sub(new Date(2017, 5, 15, 15, 29, 20), {
|
35 |
+
* years: 2,
|
36 |
+
* months: 9,
|
37 |
+
* weeks: 1,
|
38 |
+
* days: 7,
|
39 |
+
* hours: 5,
|
40 |
+
* minutes: 9,
|
41 |
+
* seconds: 30
|
42 |
+
* })
|
43 |
+
* //=> Mon Sep 1 2014 10:19:50
|
44 |
+
*/
|
45 |
+
export function sub(date, duration) {
|
46 |
+
const {
|
47 |
+
years = 0,
|
48 |
+
months = 0,
|
49 |
+
weeks = 0,
|
50 |
+
days = 0,
|
51 |
+
hours = 0,
|
52 |
+
minutes = 0,
|
53 |
+
seconds = 0,
|
54 |
+
} = duration;
|
55 |
+
|
56 |
+
// Subtract years and months
|
57 |
+
const dateWithoutMonths = subMonths(date, months + years * 12);
|
58 |
+
|
59 |
+
// Subtract weeks and days
|
60 |
+
const dateWithoutDays = subDays(dateWithoutMonths, days + weeks * 7);
|
61 |
+
|
62 |
+
// Subtract hours, minutes and seconds
|
63 |
+
const minutestoSub = minutes + hours * 60;
|
64 |
+
const secondstoSub = seconds + minutestoSub * 60;
|
65 |
+
const mstoSub = secondstoSub * 1000;
|
66 |
+
const finalDate = constructFrom(date, dateWithoutDays.getTime() - mstoSub);
|
67 |
+
|
68 |
+
return finalDate;
|
69 |
+
}
|
70 |
+
|
71 |
+
// Fallback for modularized imports:
|
72 |
+
export default sub;
|
workers1/auto3d/node_modules/date-fns/subBusinessDays.d.mts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subBusinessDays
|
3 |
+
* @category Day Helpers
|
4 |
+
* @summary Substract the specified number of business days (mon - fri) to the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Substract the specified number of business days (mon - fri) to the given date, ignoring weekends.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of business days to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the business days subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Substract 10 business days from 1 September 2014:
|
18 |
+
* const result = subBusinessDays(new Date(2014, 8, 1), 10)
|
19 |
+
* //=> Mon Aug 18 2014 00:00:00 (skipped weekend days)
|
20 |
+
*/
|
21 |
+
export declare function subBusinessDays<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subBusinessDays.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subBusinessDays
|
3 |
+
* @category Day Helpers
|
4 |
+
* @summary Substract the specified number of business days (mon - fri) to the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Substract the specified number of business days (mon - fri) to the given date, ignoring weekends.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of business days to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the business days subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Substract 10 business days from 1 September 2014:
|
18 |
+
* const result = subBusinessDays(new Date(2014, 8, 1), 10)
|
19 |
+
* //=> Mon Aug 18 2014 00:00:00 (skipped weekend days)
|
20 |
+
*/
|
21 |
+
export declare function subBusinessDays<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subBusinessDays.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.subBusinessDays = subBusinessDays;
|
3 |
+
var _index = require("./addBusinessDays.js");
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name subBusinessDays
|
7 |
+
* @category Day Helpers
|
8 |
+
* @summary Substract the specified number of business days (mon - fri) to the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Substract the specified number of business days (mon - fri) to the given date, ignoring weekends.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param amount - The amount of business days to be subtracted.
|
17 |
+
*
|
18 |
+
* @returns The new date with the business days subtracted
|
19 |
+
*
|
20 |
+
* @example
|
21 |
+
* // Substract 10 business days from 1 September 2014:
|
22 |
+
* const result = subBusinessDays(new Date(2014, 8, 1), 10)
|
23 |
+
* //=> Mon Aug 18 2014 00:00:00 (skipped weekend days)
|
24 |
+
*/
|
25 |
+
function subBusinessDays(date, amount) {
|
26 |
+
return (0, _index.addBusinessDays)(date, -amount);
|
27 |
+
}
|
workers1/auto3d/node_modules/date-fns/subBusinessDays.mjs
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { addBusinessDays } from "./addBusinessDays.mjs";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @name subBusinessDays
|
5 |
+
* @category Day Helpers
|
6 |
+
* @summary Substract the specified number of business days (mon - fri) to the given date.
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Substract the specified number of business days (mon - fri) to the given date, ignoring weekends.
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of business days to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the business days subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Substract 10 business days from 1 September 2014:
|
20 |
+
* const result = subBusinessDays(new Date(2014, 8, 1), 10)
|
21 |
+
* //=> Mon Aug 18 2014 00:00:00 (skipped weekend days)
|
22 |
+
*/
|
23 |
+
export function subBusinessDays(date, amount) {
|
24 |
+
return addBusinessDays(date, -amount);
|
25 |
+
}
|
26 |
+
|
27 |
+
// Fallback for modularized imports:
|
28 |
+
export default subBusinessDays;
|
workers1/auto3d/node_modules/date-fns/subDays.d.mts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subDays
|
3 |
+
* @category Day Helpers
|
4 |
+
* @summary Subtract the specified number of days from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of days from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of days to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the days subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 10 days from 1 September 2014:
|
18 |
+
* const result = subDays(new Date(2014, 8, 1), 10)
|
19 |
+
* //=> Fri Aug 22 2014 00:00:00
|
20 |
+
*/
|
21 |
+
export declare function subDays<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subDays.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subDays
|
3 |
+
* @category Day Helpers
|
4 |
+
* @summary Subtract the specified number of days from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of days from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of days to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the days subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 10 days from 1 September 2014:
|
18 |
+
* const result = subDays(new Date(2014, 8, 1), 10)
|
19 |
+
* //=> Fri Aug 22 2014 00:00:00
|
20 |
+
*/
|
21 |
+
export declare function subDays<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subDays.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.subDays = subDays;
|
3 |
+
var _index = require("./addDays.js");
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name subDays
|
7 |
+
* @category Day Helpers
|
8 |
+
* @summary Subtract the specified number of days from the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Subtract the specified number of days from the given date.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param amount - The amount of days to be subtracted.
|
17 |
+
*
|
18 |
+
* @returns The new date with the days subtracted
|
19 |
+
*
|
20 |
+
* @example
|
21 |
+
* // Subtract 10 days from 1 September 2014:
|
22 |
+
* const result = subDays(new Date(2014, 8, 1), 10)
|
23 |
+
* //=> Fri Aug 22 2014 00:00:00
|
24 |
+
*/
|
25 |
+
function subDays(date, amount) {
|
26 |
+
return (0, _index.addDays)(date, -amount);
|
27 |
+
}
|
workers1/auto3d/node_modules/date-fns/subDays.mjs
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { addDays } from "./addDays.mjs";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @name subDays
|
5 |
+
* @category Day Helpers
|
6 |
+
* @summary Subtract the specified number of days from the given date.
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Subtract the specified number of days from the given date.
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of days to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the days subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Subtract 10 days from 1 September 2014:
|
20 |
+
* const result = subDays(new Date(2014, 8, 1), 10)
|
21 |
+
* //=> Fri Aug 22 2014 00:00:00
|
22 |
+
*/
|
23 |
+
export function subDays(date, amount) {
|
24 |
+
return addDays(date, -amount);
|
25 |
+
}
|
26 |
+
|
27 |
+
// Fallback for modularized imports:
|
28 |
+
export default subDays;
|
workers1/auto3d/node_modules/date-fns/subHours.d.mts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subHours
|
3 |
+
* @category Hour Helpers
|
4 |
+
* @summary Subtract the specified number of hours from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of hours from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of hours to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the hours subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 2 hours from 11 July 2014 01:00:00:
|
18 |
+
* const result = subHours(new Date(2014, 6, 11, 1, 0), 2)
|
19 |
+
* //=> Thu Jul 10 2014 23:00:00
|
20 |
+
*/
|
21 |
+
export declare function subHours<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subHours.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subHours
|
3 |
+
* @category Hour Helpers
|
4 |
+
* @summary Subtract the specified number of hours from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of hours from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of hours to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the hours subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 2 hours from 11 July 2014 01:00:00:
|
18 |
+
* const result = subHours(new Date(2014, 6, 11, 1, 0), 2)
|
19 |
+
* //=> Thu Jul 10 2014 23:00:00
|
20 |
+
*/
|
21 |
+
export declare function subHours<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subHours.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.subHours = subHours;
|
3 |
+
var _index = require("./addHours.js");
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name subHours
|
7 |
+
* @category Hour Helpers
|
8 |
+
* @summary Subtract the specified number of hours from the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Subtract the specified number of hours from the given date.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param amount - The amount of hours to be subtracted.
|
17 |
+
*
|
18 |
+
* @returns The new date with the hours subtracted
|
19 |
+
*
|
20 |
+
* @example
|
21 |
+
* // Subtract 2 hours from 11 July 2014 01:00:00:
|
22 |
+
* const result = subHours(new Date(2014, 6, 11, 1, 0), 2)
|
23 |
+
* //=> Thu Jul 10 2014 23:00:00
|
24 |
+
*/
|
25 |
+
function subHours(date, amount) {
|
26 |
+
return (0, _index.addHours)(date, -amount);
|
27 |
+
}
|
workers1/auto3d/node_modules/date-fns/subHours.mjs
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { addHours } from "./addHours.mjs";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @name subHours
|
5 |
+
* @category Hour Helpers
|
6 |
+
* @summary Subtract the specified number of hours from the given date.
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Subtract the specified number of hours from the given date.
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of hours to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the hours subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Subtract 2 hours from 11 July 2014 01:00:00:
|
20 |
+
* const result = subHours(new Date(2014, 6, 11, 1, 0), 2)
|
21 |
+
* //=> Thu Jul 10 2014 23:00:00
|
22 |
+
*/
|
23 |
+
export function subHours(date, amount) {
|
24 |
+
return addHours(date, -amount);
|
25 |
+
}
|
26 |
+
|
27 |
+
// Fallback for modularized imports:
|
28 |
+
export default subHours;
|
workers1/auto3d/node_modules/date-fns/subISOWeekYears.d.mts
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subISOWeekYears
|
3 |
+
* @category ISO Week-Numbering Year Helpers
|
4 |
+
* @summary Subtract the specified number of ISO week-numbering years from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of ISO week-numbering years from the given date.
|
8 |
+
*
|
9 |
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of ISO week-numbering years to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the ISO week-numbering years subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Subtract 5 ISO week-numbering years from 1 September 2014:
|
20 |
+
* const result = subISOWeekYears(new Date(2014, 8, 1), 5)
|
21 |
+
* //=> Mon Aug 31 2009 00:00:00
|
22 |
+
*/
|
23 |
+
export declare function subISOWeekYears<DateType extends Date>(
|
24 |
+
date: DateType | number | string,
|
25 |
+
amount: number,
|
26 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subISOWeekYears.d.ts
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subISOWeekYears
|
3 |
+
* @category ISO Week-Numbering Year Helpers
|
4 |
+
* @summary Subtract the specified number of ISO week-numbering years from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of ISO week-numbering years from the given date.
|
8 |
+
*
|
9 |
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of ISO week-numbering years to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the ISO week-numbering years subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Subtract 5 ISO week-numbering years from 1 September 2014:
|
20 |
+
* const result = subISOWeekYears(new Date(2014, 8, 1), 5)
|
21 |
+
* //=> Mon Aug 31 2009 00:00:00
|
22 |
+
*/
|
23 |
+
export declare function subISOWeekYears<DateType extends Date>(
|
24 |
+
date: DateType | number | string,
|
25 |
+
amount: number,
|
26 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subISOWeekYears.js
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.subISOWeekYears = subISOWeekYears;
|
3 |
+
var _index = require("./addISOWeekYears.js");
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name subISOWeekYears
|
7 |
+
* @category ISO Week-Numbering Year Helpers
|
8 |
+
* @summary Subtract the specified number of ISO week-numbering years from the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Subtract the specified number of ISO week-numbering years from the given date.
|
12 |
+
*
|
13 |
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
14 |
+
*
|
15 |
+
* @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).
|
16 |
+
*
|
17 |
+
* @param date - The date to be changed
|
18 |
+
* @param amount - The amount of ISO week-numbering years to be subtracted.
|
19 |
+
*
|
20 |
+
* @returns The new date with the ISO week-numbering years subtracted
|
21 |
+
*
|
22 |
+
* @example
|
23 |
+
* // Subtract 5 ISO week-numbering years from 1 September 2014:
|
24 |
+
* const result = subISOWeekYears(new Date(2014, 8, 1), 5)
|
25 |
+
* //=> Mon Aug 31 2009 00:00:00
|
26 |
+
*/
|
27 |
+
function subISOWeekYears(date, amount) {
|
28 |
+
return (0, _index.addISOWeekYears)(date, -amount);
|
29 |
+
}
|
workers1/auto3d/node_modules/date-fns/subISOWeekYears.mjs
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { addISOWeekYears } from "./addISOWeekYears.mjs";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @name subISOWeekYears
|
5 |
+
* @category ISO Week-Numbering Year Helpers
|
6 |
+
* @summary Subtract the specified number of ISO week-numbering years from the given date.
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Subtract the specified number of ISO week-numbering years from the given date.
|
10 |
+
*
|
11 |
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param amount - The amount of ISO week-numbering years to be subtracted.
|
17 |
+
*
|
18 |
+
* @returns The new date with the ISO week-numbering years subtracted
|
19 |
+
*
|
20 |
+
* @example
|
21 |
+
* // Subtract 5 ISO week-numbering years from 1 September 2014:
|
22 |
+
* const result = subISOWeekYears(new Date(2014, 8, 1), 5)
|
23 |
+
* //=> Mon Aug 31 2009 00:00:00
|
24 |
+
*/
|
25 |
+
export function subISOWeekYears(date, amount) {
|
26 |
+
return addISOWeekYears(date, -amount);
|
27 |
+
}
|
28 |
+
|
29 |
+
// Fallback for modularized imports:
|
30 |
+
export default subISOWeekYears;
|
workers1/auto3d/node_modules/date-fns/subMilliseconds.d.mts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subMilliseconds
|
3 |
+
* @category Millisecond Helpers
|
4 |
+
* @summary Subtract the specified number of milliseconds from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of milliseconds from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of milliseconds to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the milliseconds subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
18 |
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
19 |
+
* //=> Thu Jul 10 2014 12:45:29.250
|
20 |
+
*/
|
21 |
+
export declare function subMilliseconds<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subMilliseconds.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subMilliseconds
|
3 |
+
* @category Millisecond Helpers
|
4 |
+
* @summary Subtract the specified number of milliseconds from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of milliseconds from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of milliseconds to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the milliseconds subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
18 |
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
19 |
+
* //=> Thu Jul 10 2014 12:45:29.250
|
20 |
+
*/
|
21 |
+
export declare function subMilliseconds<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subMilliseconds.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.subMilliseconds = subMilliseconds;
|
3 |
+
var _index = require("./addMilliseconds.js");
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name subMilliseconds
|
7 |
+
* @category Millisecond Helpers
|
8 |
+
* @summary Subtract the specified number of milliseconds from the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Subtract the specified number of milliseconds from the given date.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param amount - The amount of milliseconds to be subtracted.
|
17 |
+
*
|
18 |
+
* @returns The new date with the milliseconds subtracted
|
19 |
+
*
|
20 |
+
* @example
|
21 |
+
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
22 |
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
23 |
+
* //=> Thu Jul 10 2014 12:45:29.250
|
24 |
+
*/
|
25 |
+
function subMilliseconds(date, amount) {
|
26 |
+
return (0, _index.addMilliseconds)(date, -amount);
|
27 |
+
}
|
workers1/auto3d/node_modules/date-fns/subMilliseconds.mjs
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { addMilliseconds } from "./addMilliseconds.mjs";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @name subMilliseconds
|
5 |
+
* @category Millisecond Helpers
|
6 |
+
* @summary Subtract the specified number of milliseconds from the given date.
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Subtract the specified number of milliseconds from the given date.
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of milliseconds to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the milliseconds subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
20 |
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
21 |
+
* //=> Thu Jul 10 2014 12:45:29.250
|
22 |
+
*/
|
23 |
+
export function subMilliseconds(date, amount) {
|
24 |
+
return addMilliseconds(date, -amount);
|
25 |
+
}
|
26 |
+
|
27 |
+
// Fallback for modularized imports:
|
28 |
+
export default subMilliseconds;
|
workers1/auto3d/node_modules/date-fns/subMinutes.d.mts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subMinutes
|
3 |
+
* @category Minute Helpers
|
4 |
+
* @summary Subtract the specified number of minutes from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of minutes from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of minutes to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the minutes subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 30 minutes from 10 July 2014 12:00:00:
|
18 |
+
* const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)
|
19 |
+
* //=> Thu Jul 10 2014 11:30:00
|
20 |
+
*/
|
21 |
+
export declare function subMinutes<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subMinutes.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subMinutes
|
3 |
+
* @category Minute Helpers
|
4 |
+
* @summary Subtract the specified number of minutes from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of minutes from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of minutes to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the minutes subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 30 minutes from 10 July 2014 12:00:00:
|
18 |
+
* const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)
|
19 |
+
* //=> Thu Jul 10 2014 11:30:00
|
20 |
+
*/
|
21 |
+
export declare function subMinutes<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subMinutes.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.subMinutes = subMinutes;
|
3 |
+
var _index = require("./addMinutes.js");
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name subMinutes
|
7 |
+
* @category Minute Helpers
|
8 |
+
* @summary Subtract the specified number of minutes from the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Subtract the specified number of minutes from the given date.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param amount - The amount of minutes to be subtracted.
|
17 |
+
*
|
18 |
+
* @returns The new date with the minutes subtracted
|
19 |
+
*
|
20 |
+
* @example
|
21 |
+
* // Subtract 30 minutes from 10 July 2014 12:00:00:
|
22 |
+
* const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)
|
23 |
+
* //=> Thu Jul 10 2014 11:30:00
|
24 |
+
*/
|
25 |
+
function subMinutes(date, amount) {
|
26 |
+
return (0, _index.addMinutes)(date, -amount);
|
27 |
+
}
|
workers1/auto3d/node_modules/date-fns/subMinutes.mjs
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { addMinutes } from "./addMinutes.mjs";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @name subMinutes
|
5 |
+
* @category Minute Helpers
|
6 |
+
* @summary Subtract the specified number of minutes from the given date.
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Subtract the specified number of minutes from the given date.
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of minutes to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the minutes subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Subtract 30 minutes from 10 July 2014 12:00:00:
|
20 |
+
* const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)
|
21 |
+
* //=> Thu Jul 10 2014 11:30:00
|
22 |
+
*/
|
23 |
+
export function subMinutes(date, amount) {
|
24 |
+
return addMinutes(date, -amount);
|
25 |
+
}
|
26 |
+
|
27 |
+
// Fallback for modularized imports:
|
28 |
+
export default subMinutes;
|
workers1/auto3d/node_modules/date-fns/subMonths.d.mts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subMonths
|
3 |
+
* @category Month Helpers
|
4 |
+
* @summary Subtract the specified number of months from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of months from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of months to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the months subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 5 months from 1 February 2015:
|
18 |
+
* const result = subMonths(new Date(2015, 1, 1), 5)
|
19 |
+
* //=> Mon Sep 01 2014 00:00:00
|
20 |
+
*/
|
21 |
+
export declare function subMonths<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subMonths.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subMonths
|
3 |
+
* @category Month Helpers
|
4 |
+
* @summary Subtract the specified number of months from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of months from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of months to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the months subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 5 months from 1 February 2015:
|
18 |
+
* const result = subMonths(new Date(2015, 1, 1), 5)
|
19 |
+
* //=> Mon Sep 01 2014 00:00:00
|
20 |
+
*/
|
21 |
+
export declare function subMonths<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subMonths.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.subMonths = subMonths;
|
3 |
+
var _index = require("./addMonths.js");
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name subMonths
|
7 |
+
* @category Month Helpers
|
8 |
+
* @summary Subtract the specified number of months from the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Subtract the specified number of months from the given date.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param amount - The amount of months to be subtracted.
|
17 |
+
*
|
18 |
+
* @returns The new date with the months subtracted
|
19 |
+
*
|
20 |
+
* @example
|
21 |
+
* // Subtract 5 months from 1 February 2015:
|
22 |
+
* const result = subMonths(new Date(2015, 1, 1), 5)
|
23 |
+
* //=> Mon Sep 01 2014 00:00:00
|
24 |
+
*/
|
25 |
+
function subMonths(date, amount) {
|
26 |
+
return (0, _index.addMonths)(date, -amount);
|
27 |
+
}
|
workers1/auto3d/node_modules/date-fns/subMonths.mjs
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { addMonths } from "./addMonths.mjs";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @name subMonths
|
5 |
+
* @category Month Helpers
|
6 |
+
* @summary Subtract the specified number of months from the given date.
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Subtract the specified number of months from the given date.
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of months to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the months subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Subtract 5 months from 1 February 2015:
|
20 |
+
* const result = subMonths(new Date(2015, 1, 1), 5)
|
21 |
+
* //=> Mon Sep 01 2014 00:00:00
|
22 |
+
*/
|
23 |
+
export function subMonths(date, amount) {
|
24 |
+
return addMonths(date, -amount);
|
25 |
+
}
|
26 |
+
|
27 |
+
// Fallback for modularized imports:
|
28 |
+
export default subMonths;
|
workers1/auto3d/node_modules/date-fns/subQuarters.d.mts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subQuarters
|
3 |
+
* @category Quarter Helpers
|
4 |
+
* @summary Subtract the specified number of year quarters from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of year quarters from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of quarters to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the quarters subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 3 quarters from 1 September 2014:
|
18 |
+
* const result = subQuarters(new Date(2014, 8, 1), 3)
|
19 |
+
* //=> Sun Dec 01 2013 00:00:00
|
20 |
+
*/
|
21 |
+
export declare function subQuarters<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subQuarters.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subQuarters
|
3 |
+
* @category Quarter Helpers
|
4 |
+
* @summary Subtract the specified number of year quarters from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of year quarters from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of quarters to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the quarters subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 3 quarters from 1 September 2014:
|
18 |
+
* const result = subQuarters(new Date(2014, 8, 1), 3)
|
19 |
+
* //=> Sun Dec 01 2013 00:00:00
|
20 |
+
*/
|
21 |
+
export declare function subQuarters<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subQuarters.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.subQuarters = subQuarters;
|
3 |
+
var _index = require("./addQuarters.js");
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name subQuarters
|
7 |
+
* @category Quarter Helpers
|
8 |
+
* @summary Subtract the specified number of year quarters from the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Subtract the specified number of year quarters from the given date.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param amount - The amount of quarters to be subtracted.
|
17 |
+
*
|
18 |
+
* @returns The new date with the quarters subtracted
|
19 |
+
*
|
20 |
+
* @example
|
21 |
+
* // Subtract 3 quarters from 1 September 2014:
|
22 |
+
* const result = subQuarters(new Date(2014, 8, 1), 3)
|
23 |
+
* //=> Sun Dec 01 2013 00:00:00
|
24 |
+
*/
|
25 |
+
function subQuarters(date, amount) {
|
26 |
+
return (0, _index.addQuarters)(date, -amount);
|
27 |
+
}
|
workers1/auto3d/node_modules/date-fns/subQuarters.mjs
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { addQuarters } from "./addQuarters.mjs";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @name subQuarters
|
5 |
+
* @category Quarter Helpers
|
6 |
+
* @summary Subtract the specified number of year quarters from the given date.
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Subtract the specified number of year quarters from the given date.
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of quarters to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the quarters subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Subtract 3 quarters from 1 September 2014:
|
20 |
+
* const result = subQuarters(new Date(2014, 8, 1), 3)
|
21 |
+
* //=> Sun Dec 01 2013 00:00:00
|
22 |
+
*/
|
23 |
+
export function subQuarters(date, amount) {
|
24 |
+
return addQuarters(date, -amount);
|
25 |
+
}
|
26 |
+
|
27 |
+
// Fallback for modularized imports:
|
28 |
+
export default subQuarters;
|
workers1/auto3d/node_modules/date-fns/subSeconds.d.mts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subSeconds
|
3 |
+
* @category Second Helpers
|
4 |
+
* @summary Subtract the specified number of seconds from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of seconds from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of seconds to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the seconds subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 30 seconds from 10 July 2014 12:45:00:
|
18 |
+
* const result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
|
19 |
+
* //=> Thu Jul 10 2014 12:44:30
|
20 |
+
*/
|
21 |
+
export declare function subSeconds<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subSeconds.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @name subSeconds
|
3 |
+
* @category Second Helpers
|
4 |
+
* @summary Subtract the specified number of seconds from the given date.
|
5 |
+
*
|
6 |
+
* @description
|
7 |
+
* Subtract the specified number of seconds from the given date.
|
8 |
+
*
|
9 |
+
* @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).
|
10 |
+
*
|
11 |
+
* @param date - The date to be changed
|
12 |
+
* @param amount - The amount of seconds to be subtracted.
|
13 |
+
*
|
14 |
+
* @returns The new date with the seconds subtracted
|
15 |
+
*
|
16 |
+
* @example
|
17 |
+
* // Subtract 30 seconds from 10 July 2014 12:45:00:
|
18 |
+
* const result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
|
19 |
+
* //=> Thu Jul 10 2014 12:44:30
|
20 |
+
*/
|
21 |
+
export declare function subSeconds<DateType extends Date>(
|
22 |
+
date: DateType | number | string,
|
23 |
+
amount: number,
|
24 |
+
): DateType;
|
workers1/auto3d/node_modules/date-fns/subSeconds.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
exports.subSeconds = subSeconds;
|
3 |
+
var _index = require("./addSeconds.js");
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @name subSeconds
|
7 |
+
* @category Second Helpers
|
8 |
+
* @summary Subtract the specified number of seconds from the given date.
|
9 |
+
*
|
10 |
+
* @description
|
11 |
+
* Subtract the specified number of seconds from the given date.
|
12 |
+
*
|
13 |
+
* @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).
|
14 |
+
*
|
15 |
+
* @param date - The date to be changed
|
16 |
+
* @param amount - The amount of seconds to be subtracted.
|
17 |
+
*
|
18 |
+
* @returns The new date with the seconds subtracted
|
19 |
+
*
|
20 |
+
* @example
|
21 |
+
* // Subtract 30 seconds from 10 July 2014 12:45:00:
|
22 |
+
* const result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
|
23 |
+
* //=> Thu Jul 10 2014 12:44:30
|
24 |
+
*/
|
25 |
+
function subSeconds(date, amount) {
|
26 |
+
return (0, _index.addSeconds)(date, -amount);
|
27 |
+
}
|
workers1/auto3d/node_modules/date-fns/subSeconds.mjs
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { addSeconds } from "./addSeconds.mjs";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @name subSeconds
|
5 |
+
* @category Second Helpers
|
6 |
+
* @summary Subtract the specified number of seconds from the given date.
|
7 |
+
*
|
8 |
+
* @description
|
9 |
+
* Subtract the specified number of seconds from the given date.
|
10 |
+
*
|
11 |
+
* @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).
|
12 |
+
*
|
13 |
+
* @param date - The date to be changed
|
14 |
+
* @param amount - The amount of seconds to be subtracted.
|
15 |
+
*
|
16 |
+
* @returns The new date with the seconds subtracted
|
17 |
+
*
|
18 |
+
* @example
|
19 |
+
* // Subtract 30 seconds from 10 July 2014 12:45:00:
|
20 |
+
* const result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
|
21 |
+
* //=> Thu Jul 10 2014 12:44:30
|
22 |
+
*/
|
23 |
+
export function subSeconds(date, amount) {
|
24 |
+
return addSeconds(date, -amount);
|
25 |
+
}
|
26 |
+
|
27 |
+
// Fallback for modularized imports:
|
28 |
+
export default subSeconds;
|