turf-common 1.4.2-beta.47 → 1.4.2-beta.48
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.
|
@@ -111,7 +111,12 @@ var BookingCode = /** @class */ (function () {
|
|
|
111
111
|
};
|
|
112
112
|
BookingCode.prototype.isModificationAllowed = function (delayInMinutes) {
|
|
113
113
|
if (delayInMinutes === void 0) { delayInMinutes = _utils_1.DEFAULT_BOOKING_MODIFICATION_DELAY_IN_MINUTES; }
|
|
114
|
-
var
|
|
114
|
+
var dateWithToTimeCode = this.getDateWithToTimeCode();
|
|
115
|
+
// If last four digits of dateWithToTimeCode is 2400, then replace it with 2359
|
|
116
|
+
if (dateWithToTimeCode.slice(-4) === _utils_1.END_OF_DAY_TIME_CODE) {
|
|
117
|
+
dateWithToTimeCode = dateWithToTimeCode.slice(0, -4) + "2359";
|
|
118
|
+
}
|
|
119
|
+
var bookingToDateTimeWithDelay = date_util_1.dateUtilService.addMinutesTo(date_util_1.dateUtilService.convertStringToDate(dateWithToTimeCode, "yyMMddHHmm"), delayInMinutes);
|
|
115
120
|
var currentTime = date_util_1.dateUtilService.getIndianDate();
|
|
116
121
|
return bookingToDateTimeWithDelay > currentTime;
|
|
117
122
|
};
|