turf-common 1.2.1-beta.16 → 1.2.1-beta.18
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.
|
@@ -145,7 +145,7 @@ var BookingCode = /** @class */ (function () {
|
|
|
145
145
|
discount = parseFloat(couponCode);
|
|
146
146
|
}
|
|
147
147
|
else if (code && code[0] === "PHU") {
|
|
148
|
-
if (
|
|
148
|
+
if (totalBookingHours === undefined) {
|
|
149
149
|
throw new app_badrequest_exception_1.AppBadRequestException({
|
|
150
150
|
key: "totalBookingHours",
|
|
151
151
|
message: [
|
package/build/utils/date-util.js
CHANGED
|
@@ -65,6 +65,10 @@ var DateUtilService = /** @class */ (function () {
|
|
|
65
65
|
};
|
|
66
66
|
DateUtilService.prototype.calculateDateDifference = function (fromDateCode, toDateCode, unit) {
|
|
67
67
|
if (unit === void 0) { unit = "minute"; }
|
|
68
|
+
if (toDateCode.slice(-4, -2) === "24") {
|
|
69
|
+
toDateCode =
|
|
70
|
+
exports.dateUtilService.addNDaysToDateCode(toDateCode.slice(0, -4), 1) + "0000";
|
|
71
|
+
}
|
|
68
72
|
var fromDate = (0, date_fns_1.parse)(fromDateCode, "yyMMddHHmm", new Date());
|
|
69
73
|
var toDate = (0, date_fns_1.parse)(toDateCode, "yyMMddHHmm", new Date());
|
|
70
74
|
var minutesDifference = (0, date_fns_1.differenceInMinutes)(toDate, fromDate);
|