turf-common 1.2.1-beta.56 → 1.2.1-beta.57
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.
|
@@ -35,5 +35,14 @@ export declare class DateUtilService {
|
|
|
35
35
|
getMonthRangeByDateCodes(startDateCode: string, endDateCode: string): number[];
|
|
36
36
|
convertToMidnight(time: IConvertToMidNightTime): IConvertToMidNightTime;
|
|
37
37
|
convertMonthsToNumber: (months: INgbDateStruct) => string;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves booking date codes for a specified date range and weekdays.
|
|
40
|
+
*
|
|
41
|
+
* @param startDateCode - The starting date code for the date range.
|
|
42
|
+
* @param endDateCode - The ending date code for the date range.
|
|
43
|
+
* @param weekdays - An array of numbers representing weekdays (1 for Monday through 7 for Sunday).
|
|
44
|
+
* @returns An array of booking date codes based on the provided date range and weekdays.
|
|
45
|
+
*/
|
|
46
|
+
getBookingCodeByWeekDaysAndDateRange(startDateCode: string, endDateCode: string, weekdays: number[]): string[];
|
|
38
47
|
}
|
|
39
48
|
export declare const dateUtilService: DateUtilService;
|
package/build/utils/date-util.js
CHANGED
|
@@ -121,6 +121,23 @@ var DateUtilService = /** @class */ (function () {
|
|
|
121
121
|
return { hour: 24, minute: 0 };
|
|
122
122
|
return time;
|
|
123
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* Retrieves booking date codes for a specified date range and weekdays.
|
|
126
|
+
*
|
|
127
|
+
* @param startDateCode - The starting date code for the date range.
|
|
128
|
+
* @param endDateCode - The ending date code for the date range.
|
|
129
|
+
* @param weekdays - An array of numbers representing weekdays (1 for Monday through 7 for Sunday).
|
|
130
|
+
* @returns An array of booking date codes based on the provided date range and weekdays.
|
|
131
|
+
*/
|
|
132
|
+
DateUtilService.prototype.getBookingCodeByWeekDaysAndDateRange = function (startDateCode, endDateCode, weekdays) {
|
|
133
|
+
var bookingDateCodes = [];
|
|
134
|
+
weekdays.forEach(function (weekDay) {
|
|
135
|
+
var startDateCodeCopy = Number(startDateCode);
|
|
136
|
+
var endDateCodeCopy = Number(endDateCode);
|
|
137
|
+
bookingDateCodes.push.apply(bookingDateCodes, _model_1.BookingCode.getDateCodesByWeek(startDateCodeCopy, endDateCodeCopy, weekDay));
|
|
138
|
+
});
|
|
139
|
+
return bookingDateCodes;
|
|
140
|
+
};
|
|
124
141
|
return DateUtilService;
|
|
125
142
|
}());
|
|
126
143
|
exports.DateUtilService = DateUtilService;
|