mts-booking-library 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getISOStringWithoutGMT = void 0;
4
- /**
5
- * This method return the ISO string of the date without GMT. An ISO string looks like this: YYYY-MM-DDThh:mm:ss.mmmZ
6
- * @param {Date | string} date the date to convert
7
- * @param {boolean} [removeTimezone=true] if true, the timezone will be removed from the ISO string, meaning
8
- * that the string will look like this: YYYY-MM-DDThh:mm:ss.mmm
9
- * @returns {string} the ISO string
10
- */
11
- var getISOStringWithoutGMT = function (date, removeTimezone) {
12
- if (removeTimezone === void 0) { removeTimezone = true; }
13
- if (!date)
14
- return null;
15
- var newDate = new Date(date);
16
- var isoString = new Date(newDate.valueOf() - newDate.getTimezoneOffset() * 60000).toISOString();
17
- return removeTimezone ? isoString.slice(0, -1) : isoString;
18
- };
19
- exports.getISOStringWithoutGMT = getISOStringWithoutGMT;