@8ms/helpers 2.0.23 → 2.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/date/calculation.d.ts +1 -1
- package/date/calculation.js +3 -3
- package/package.json +1 -1
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/date/calculation.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare const getDatesBetween: (start: InputDate, end: InputDate) => Date
|
|
|
39
39
|
/**
|
|
40
40
|
* Get an array of DateTime objects representing the 1st of each month between start and end dates.
|
|
41
41
|
*/
|
|
42
|
-
export declare const
|
|
42
|
+
export declare const getMonthsBetween: (start: InputDate, end: InputDate) => DateTime<boolean>[];
|
|
43
43
|
/**
|
|
44
44
|
* If a given date is beyond the maximum, return the maximum.
|
|
45
45
|
*/
|
package/date/calculation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLastWeek = exports.isThisWeek = exports.getYesterday = exports.getWeeksAgo = exports.getToday = exports.getTwoWeeksAgo = exports.getThisWeek = exports.getLastWeek = exports.getSunday = exports.getMonday = exports.getMin = exports.getMax = exports.
|
|
3
|
+
exports.isLastWeek = exports.isThisWeek = exports.getYesterday = exports.getWeeksAgo = exports.getToday = exports.getTwoWeeksAgo = exports.getThisWeek = exports.getLastWeek = exports.getSunday = exports.getMonday = exports.getMin = exports.getMax = exports.getMonthsBetween = exports.getDatesBetween = exports.differenceInBusinessDays = exports.differenceInMinutes = exports.isWeekend = exports.isSunday = exports.isSaturday = exports.isFriday = exports.isThursday = exports.isWednesday = exports.isTuesday = exports.isMonday = exports.getDate = exports.getUnix = void 0;
|
|
4
4
|
const luxon_1 = require("luxon");
|
|
5
5
|
const getUnix = (input) => {
|
|
6
6
|
return (0, exports.getDate)(input)
|
|
@@ -133,7 +133,7 @@ exports.getDatesBetween = getDatesBetween;
|
|
|
133
133
|
/**
|
|
134
134
|
* Get an array of DateTime objects representing the 1st of each month between start and end dates.
|
|
135
135
|
*/
|
|
136
|
-
const
|
|
136
|
+
const getMonthsBetween = (start, end) => {
|
|
137
137
|
const months = [];
|
|
138
138
|
const endDate = (0, exports.getDate)(end)
|
|
139
139
|
.startOf("month");
|
|
@@ -146,7 +146,7 @@ const getMonthlyDatesArray = (start, end) => {
|
|
|
146
146
|
}
|
|
147
147
|
return months;
|
|
148
148
|
};
|
|
149
|
-
exports.
|
|
149
|
+
exports.getMonthsBetween = getMonthsBetween;
|
|
150
150
|
/**
|
|
151
151
|
* If a given date is beyond the maximum, return the maximum.
|
|
152
152
|
*/
|