turf-common 1.4.2-beta.42 → 1.4.2-beta.44
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.
|
@@ -250,7 +250,14 @@ var ChargesModel = /** @class */ (function () {
|
|
|
250
250
|
if (discountPolicy === void 0) { discountPolicy = modification_discount_policy_enum_1.ModificationDiscountPolicy.DISCOUNT_CONDITIONAL; }
|
|
251
251
|
var chargesModel = new ChargesModel(chargeData.initialBookingGrossAmount, chargeData.amountPaid, chargeData.couponCode, parseFloat(chargeData.totalBookingHours.toString()), discountPolicy);
|
|
252
252
|
var initialBookingGrossAmount = chargeData.initialBookingGrossAmount, amountPaid = chargeData.amountPaid, couponCode = chargeData.couponCode, totalBookingHours = chargeData.totalBookingHours, rest = __rest(chargeData, ["initialBookingGrossAmount", "amountPaid", "couponCode", "totalBookingHours"]);
|
|
253
|
-
|
|
253
|
+
chargesModel.additionalBookingGrossAmount = rest.additionalBookingGrossAmount;
|
|
254
|
+
chargesModel.cancelledBookingGrossAmount = rest.cancelledBookingGrossAmount;
|
|
255
|
+
chargesModel.refundPayable = rest.refundPayable;
|
|
256
|
+
chargesModel.totalRefundedAmount = rest.totalRefundedAmount;
|
|
257
|
+
chargesModel.totalCancellationCharges = rest.totalCancellationCharges;
|
|
258
|
+
chargesModel.netTotal = rest.netTotal;
|
|
259
|
+
chargesModel.amountPayable = rest.amountPayable;
|
|
260
|
+
// Object.assign(chargesModel, rest);
|
|
254
261
|
return chargesModel;
|
|
255
262
|
};
|
|
256
263
|
// static assignByInterface(
|
|
@@ -54,5 +54,10 @@ export declare class DateUtilService {
|
|
|
54
54
|
*/
|
|
55
55
|
getBookingCodeByWeekDaysAndDateRange(startDateCode: string, endDateCode: string, weekdays: number[]): string[];
|
|
56
56
|
formatDate(date: Date, formatString: string): string;
|
|
57
|
+
convertDateToTimezone(date: Date, timeZone: Timezone): Date;
|
|
58
|
+
convertDateToUTC(now: Date): Date;
|
|
59
|
+
}
|
|
60
|
+
export declare enum Timezone {
|
|
61
|
+
IST = "Asia/Kolkata"
|
|
57
62
|
}
|
|
58
63
|
export declare const dateUtilService: DateUtilService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dateUtilService = exports.DateUtilService = void 0;
|
|
3
|
+
exports.dateUtilService = exports.Timezone = exports.DateUtilService = void 0;
|
|
4
4
|
var date_fns_1 = require("date-fns");
|
|
5
5
|
var _model_1 = require("../@model");
|
|
6
6
|
var DateUtilService = /** @class */ (function () {
|
|
@@ -159,7 +159,18 @@ var DateUtilService = /** @class */ (function () {
|
|
|
159
159
|
DateUtilService.prototype.formatDate = function (date, formatString) {
|
|
160
160
|
return (0, date_fns_1.format)(date, formatString);
|
|
161
161
|
};
|
|
162
|
+
DateUtilService.prototype.convertDateToTimezone = function (date, timeZone) {
|
|
163
|
+
return new Date(date.toLocaleString("en-US", { timeZone: timeZone }));
|
|
164
|
+
// return new Date(date.getTime() + offset);
|
|
165
|
+
};
|
|
166
|
+
DateUtilService.prototype.convertDateToUTC = function (now) {
|
|
167
|
+
return new Date(now.getTime() + now.getTimezoneOffset() * 60 * 1000);
|
|
168
|
+
};
|
|
162
169
|
return DateUtilService;
|
|
163
170
|
}());
|
|
164
171
|
exports.DateUtilService = DateUtilService;
|
|
172
|
+
var Timezone;
|
|
173
|
+
(function (Timezone) {
|
|
174
|
+
Timezone["IST"] = "Asia/Kolkata";
|
|
175
|
+
})(Timezone || (exports.Timezone = Timezone = {}));
|
|
165
176
|
exports.dateUtilService = new DateUtilService();
|