From e8a9ad77b64330141eab80cb383e09197a0eed3c Mon Sep 17 00:00:00 2001 From: Arash Mousavi Date: Sun, 26 May 2024 16:34:36 +0100 Subject: [PATCH] Bump version to 1.1.5 --- lib/jdate.js | 178 ++++++++++++++++++----------------------------- lib/jdate.min.js | 4 +- package.json | 2 +- 3 files changed, 69 insertions(+), 115 deletions(-) diff --git a/lib/jdate.js b/lib/jdate.js index 53bb11d..45c5f4e 100644 --- a/lib/jdate.js +++ b/lib/jdate.js @@ -7,7 +7,7 @@ exports["JDate"] = factory(); else root["JDate"] = factory(); -})(this, function() { +})(this, () => { return /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ @@ -22,7 +22,8 @@ module.exports = { ABBR_DAYS: ['۱ش', '۲ش', '۳ش', '۴ش', '۵ش', 'ج', 'ش'], DAYS_NAMES: ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنج‌شنبه', 'جمعه', 'شنبه'], GREGORIAN_EPOCH: 1721425.5, - PERSIAN_EPOCH: 1948320.5 + PERSIAN_EPOCH: 1948320.5, + NON_LEAP_CORRECTION: [1502, 1601, 1634, 1667, 1700, 1733, 1766, 1799, 1832, 1865, 1898, 1931, 1964, 1997, 2030, 2059, 2063, 2096, 2129, 2158, 2162, 2191, 2195, 2224, 2228, 2257, 2261, 2290, 2294, 2323, 2327, 2356, 2360, 2389, 2393, 2422, 2426, 2455, 2459, 2488, 2492, 2521, 2525, 2554, 2558, 2587, 2591, 2620, 2624, 2653, 2657, 2686, 2690, 2719, 2723, 2748, 2752, 2756, 2781, 2785, 2789, 2818, 2822, 2847, 2851, 2855, 2880, 2884, 2888, 2913, 2917, 2921, 2946, 2950, 2954, 2979, 2983, 2987] }; /***/ }), @@ -41,32 +42,31 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/constants.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_constants__WEBPACK_IMPORTED_MODULE_1__); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - - +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } var Converter = /*#__PURE__*/function () { function Converter() { _classCallCheck(this, Converter); } - - _createClass(Converter, null, [{ + return _createClass(Converter, null, [{ key: "leapGregorian", - value: // LEAP_GREGORIAN -- Is a given year in the Gregorian calendar a leap year? + value: + // LEAP_GREGORIAN -- Is a given year in the Gregorian calendar a leap year? function leapGregorian(year) { return year % 4 === 0 && !(year % 100 === 0 && year % 400 !== 0); - } // GREGORIAN_TO_JD -- Determine Julian day number from Gregorian calendar date + } + // GREGORIAN_TO_JD -- Determine Julian day number from Gregorian calendar date }, { key: "gregorianToJulian", value: function gregorianToJulian(year, month, day) { var pad; - if (month <= 2) { pad = 0; } else if (Converter.leapGregorian(year)) { @@ -74,10 +74,10 @@ var Converter = /*#__PURE__*/function () { } else { pad = -2; } - return _constants__WEBPACK_IMPORTED_MODULE_1__.GREGORIAN_EPOCH - 1 + 365 * (year - 1) + Math.floor((year - 1) / 4) + -Math.floor((year - 1) / 100) + Math.floor((year - 1) / 400) + Math.floor((367 * month - 362) / 12 + (pad + day)); - } // JD_TO_GREGORIAN -- Calculate Gregorian calendar date from Julian day + } + // JD_TO_GREGORIAN -- Calculate Gregorian calendar date from Julian day }, { key: "julianToGregorian", value: function julianToGregorian(jd) { @@ -91,14 +91,11 @@ var Converter = /*#__PURE__*/function () { var dquad = (0,_helpers__WEBPACK_IMPORTED_MODULE_0__.mod)(dcent, 1461); var yindex = Math.floor(dquad / 365); var year = quadricent * 400 + cent * 100 + quad * 4 + yindex; - if (!(cent === 4 || yindex === 4)) { year += 1; } - var yearday = wjd - Converter.gregorianToJulian(year, 1, 1); var leapadj; - if (wjd < Converter.gregorianToJulian(year, 3, 1)) { leapadj = 0; } else if (Converter.leapGregorian(year) ? 1 : 2) { @@ -106,28 +103,34 @@ var Converter = /*#__PURE__*/function () { } else { leapadj = 2; } - var month = Math.floor(((yearday + leapadj) * 12 + 373) / 367); var day = wjd - Converter.gregorianToJulian(year, month, 1) + 1; return [year, month, day]; - } // LEAP_PERSIAN -- Is a given year a leap year in the Persian calendar ? + } + // LEAP_PERSIAN -- Is a given year a leap year in the Persian calendar ? }, { key: "leapPersian", value: function leapPersian(year) { - if (year === 1403) return true; // Well, algorithms are not perfect \o/ - - return ((year - (year > 0 ? 474 : 473)) % 2820 + 474 + 38) * 682 % 2816 < 682; - } // PERSIAN_TO_JD -- Determine Julian day from Persian date + if (_constants__WEBPACK_IMPORTED_MODULE_1__.NON_LEAP_CORRECTION.includes(year)) { + return false; + } + if (_constants__WEBPACK_IMPORTED_MODULE_1__.NON_LEAP_CORRECTION.includes(year - 1)) { + return true; + } + return (25 * year + 11) % 33 < 8; + } + // PERSIAN_TO_JD -- Determine Julian day from Persian date }, { key: "persianToJulian", value: function persianToJulian(year, month, day) { var epbase = year - (year >= 0 ? 474 : 473); var epyear = 474 + (0,_helpers__WEBPACK_IMPORTED_MODULE_0__.mod)(epbase, 2820); return day + (month <= 7 ? (month - 1) * 31 : (month - 1) * 30 + 6) + Math.floor((epyear * 682 - 110) / 2816) + (epyear - 1) * 365 + Math.floor(epbase / 2820) * 1029983 + (_constants__WEBPACK_IMPORTED_MODULE_1__.PERSIAN_EPOCH - 1); - } // JD_TO_PERSIAN -- Calculate Persian date from Julian day + } + // JD_TO_PERSIAN -- Calculate Persian date from Julian day }, { key: "julianToPersian", value: function julianToPersian(jd) { @@ -136,7 +139,6 @@ var Converter = /*#__PURE__*/function () { var cycle = Math.floor(depoch / 1029983); var cyear = (0,_helpers__WEBPACK_IMPORTED_MODULE_0__.mod)(depoch, 1029983); var ycycle; - if (cyear === 1029982) { ycycle = 2820; } else { @@ -144,13 +146,10 @@ var Converter = /*#__PURE__*/function () { var aux2 = (0,_helpers__WEBPACK_IMPORTED_MODULE_0__.mod)(cyear, 366); ycycle = Math.floor((2134 * aux1 + 2816 * aux2 + 2815) / 1028522) + aux1 + 1; } - var year = ycycle + 2820 * cycle + 474; - if (year <= 0) { year -= 1; } - var yday = njd - Converter.persianToJulian(year, 1, 1) + 1; var month = yday <= 186 ? Math.ceil(yday / 31) : Math.ceil((yday - 6) / 30); var day = njd - Converter.persianToJulian(year, month, 1) + 1; @@ -169,12 +168,9 @@ var Converter = /*#__PURE__*/function () { return Converter.julianToPersian(julian); } }]); - - return Converter; }(); - /***/ }), /***/ "./src/helpers.js": @@ -186,18 +182,19 @@ var Converter = /*#__PURE__*/function () { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "div": () => (/* binding */ div), -/* harmony export */ "mod": () => (/* binding */ mod), -/* harmony export */ "fixMonth": () => (/* binding */ fixMonth), -/* harmony export */ "zeroLeading": () => (/* binding */ zeroLeading), -/* harmony export */ "replaceYear": () => (/* binding */ replaceYear), -/* harmony export */ "replaceMonth": () => (/* binding */ replaceMonth), -/* harmony export */ "replaceDay": () => (/* binding */ replaceDay) +/* harmony export */ div: () => (/* binding */ div), +/* harmony export */ fixMonth: () => (/* binding */ fixMonth), +/* harmony export */ mod: () => (/* binding */ mod), +/* harmony export */ replaceDay: () => (/* binding */ replaceDay), +/* harmony export */ replaceMonth: () => (/* binding */ replaceMonth), +/* harmony export */ replaceYear: () => (/* binding */ replaceYear), +/* harmony export */ zeroLeading: () => (/* binding */ zeroLeading) /* harmony export */ }); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./src/constants.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_constants__WEBPACK_IMPORTED_MODULE_0__); /* eslint-disable no-unused-vars */ + function div(a, b) { return Math.floor(a / b); } @@ -211,23 +208,19 @@ function fixMonth(year, month) { var newMonth = month - yearDiff * 12; return [newYear, newMonth]; } - return [year, month]; } function zeroLeading(str) { if (str && str.length === 1) { return "0".concat(str); } - return str; } function replaceYear(str, date) { var match = str.match(/[yY]+/); - if (!match) { return str; } - switch (match[0]) { case 'YYYY': case 'YYY': @@ -235,14 +228,11 @@ function replaceYear(str, date) { var value = replaceYear(str.replace(match, date.getFullYear()), date); return value; } - case 'YY': { var _value = replaceYear(str.replace(match, String(date.getFullYear()).slice(2)), date); - return _value; } - default: { return str; @@ -251,35 +241,27 @@ function replaceYear(str, date) { } function replaceMonth(str, date) { var match = str.match(/[mM]+/); - if (!match) { return str; } - switch (match[0]) { case 'M': { var value = replaceMonth(str.replace(match, date.getMonth()), date); return value; } - case 'MM': { var zeroLeadingMonth = zeroLeading(date.getMonth().toString()); - var _value2 = replaceMonth(str.replace(match, zeroLeadingMonth), date); - return _value2; } - case 'MMM': case 'MMMM': { var _value3 = replaceMonth(str.replace(match, _constants__WEBPACK_IMPORTED_MODULE_0__.MONTH_NAMES[date.getMonth() - 1]), date); - return _value3; } - default: { return str; @@ -288,43 +270,33 @@ function replaceMonth(str, date) { } function replaceDay(str, date) { var match = str.match(/[dD]+/); - if (!match) { return str; } - switch (match[0]) { case 'D': { var value = replaceDay(str.replace(match, date.getDate()), date); return value; } - case 'DD': { var zeroLeadingDate = zeroLeading(date.getDate().toString()); - var _value4 = replaceDay(str.replace(match, zeroLeadingDate), date); - return _value4; } - case 'd': case 'dd': { var _value5 = replaceDay(str.replace(match, _constants__WEBPACK_IMPORTED_MODULE_0__.ABBR_DAYS[date.getDay()]), date); - return _value5; } - case 'ddd': case 'dddd': { var _value6 = replaceDay(str.replace(match, _constants__WEBPACK_IMPORTED_MODULE_0__.DAYS_NAMES[date.getDay()]), date); - return _value6; } - default: { return str; @@ -415,24 +387,18 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ }); /* harmony import */ var _converter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./converter */ "./src/converter.js"); /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./src/helpers.js"); -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } - +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* * https://github.com/arashm/JDate * @author: Arash Mousavi @@ -443,11 +409,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d var JDate = /*#__PURE__*/function () { function JDate() { _classCallCheck(this, JDate); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - if (Array.isArray(args[0]) || args[0] instanceof Date) { this.input = args[0]; } else if (args.length === 3) { @@ -457,7 +421,6 @@ var JDate = /*#__PURE__*/function () { } else { throw new Error('Unexpected input'); } - if (Array.isArray(this.input)) { this.date = this.input.map(function (num) { return parseInt(num, 10); @@ -468,15 +431,14 @@ var JDate = /*#__PURE__*/function () { this.date = JDate.toJalali(this.input); } } + /* * Coverts a Gregorian date to Jalali date * * @params {Date} date * @return {Array} */ - - - _createClass(JDate, [{ + return _createClass(JDate, [{ key: "toGregorian", value: /* @@ -485,24 +447,24 @@ var JDate = /*#__PURE__*/function () { function toGregorian() { return JDate.toGregorian(this.date[0], this.date[1], this.date[2]); } + /* * Shows Jalali's full year, ex: 1393 * * @return {Integer} */ - }, { key: "getFullYear", value: function getFullYear() { return this.date[0]; } + /* * Sets the Jalali full year * * @params {Number} year * @return {JDate} */ - }, { key: "setFullYear", value: function setFullYear(year) { @@ -510,54 +472,52 @@ var JDate = /*#__PURE__*/function () { this.input = this.toGregorian(); return this; } + /* * Shows Jalali month number. * * @return {Number} Jalali month number */ - }, { key: "getMonth", value: function getMonth() { return this.date[1]; } + /* * Sets the Jalali month number. An integer between 0 and 11 * * @params {Number} month * @returns {JDate} */ - }, { key: "setMonth", value: function setMonth(month) { var fixed = _helpers__WEBPACK_IMPORTED_MODULE_1__.fixMonth(this.getFullYear(), parseInt(month, 10)); - var _fixed = _slicedToArray(fixed, 2); - this.date[0] = _fixed[0]; this.date[1] = _fixed[1]; this.input = this.toGregorian(); return this; } + /* * Shows Jalali day number. A number between 0 to 31 * * @return {Number} Jalali day number */ - }, { key: "getDate", value: function getDate() { return this.date[2]; } + /* * Sets Jalali day number. A number between 0 to 31 * * @params {Number} date * @return {JDate} */ - }, { key: "setDate", value: function setDate(date) { @@ -565,24 +525,24 @@ var JDate = /*#__PURE__*/function () { this.input = this.toGregorian(); return this; } + /* * Returns the day of the week for the specified date. A number between 0 to 6 * * @returns {Number} */ - }, { key: "getDay", value: function getDay() { return this._d.getDay(); } + /* * Returns a formated output of current date * * @params {String} format * @return {String} */ - }, { key: "format", value: function format(_format) { @@ -597,13 +557,15 @@ var JDate = /*#__PURE__*/function () { var julianDate = _converter__WEBPACK_IMPORTED_MODULE_0__["default"].gregorianToJulian(date.getFullYear(), date.getMonth() + 1, date.getDate()); var jdate = _converter__WEBPACK_IMPORTED_MODULE_0__["default"].julianToPersian(julianDate); return jdate; - } // eslint-disable-next-line camelcase + } + // eslint-disable-next-line camelcase }, { key: "to_jalali", value: function to_jalali(date) { return JDate.toJalali(date); } + /* * converts a Jalali date to Gregorian * @@ -612,31 +574,32 @@ var JDate = /*#__PURE__*/function () { * @params {Number} day * @return {Date} */ - }, { key: "toGregorian", value: function toGregorian(year, month, day) { var gdate = _converter__WEBPACK_IMPORTED_MODULE_0__["default"].julianToGregorian(_converter__WEBPACK_IMPORTED_MODULE_0__["default"].persianToJulian(year, month, day)); return new Date(+gdate[0], +gdate[1] - 1, +gdate[2]); - } // eslint-disable-next-line camelcase + } + // eslint-disable-next-line camelcase }, { key: "to_gregorian", value: function to_gregorian(year, month, day) { return JDate.toGregorian(year, month, day); } + /* * Checks if a given year is a leap year or not * * @params {Number} year * @return {Boolean} */ - }, { key: "isLeapYear", value: function isLeapYear(year) { return _converter__WEBPACK_IMPORTED_MODULE_0__["default"].leapPersian(year); } + /* * Returns month length. * @@ -644,40 +607,31 @@ var JDate = /*#__PURE__*/function () { * @params {Number} month zero based * @return {Number} */ - }, { key: "daysInMonth", value: function daysInMonth(year, month) { var calcedYear = year - Math.floor(month / 12); var calcedMonth = month - Math.floor(month / 12) * 12; - if (calcedMonth < 0) { calcedMonth += 12; calcedYear -= 1; } else if (calcedMonth === 0) { calcedMonth = 12; } - if (calcedMonth < 6) { return 31; } - if (calcedMonth < 11) { return 30; } - if (JDate.isLeapYear(calcedYear)) { return 30; } - return 29; } }]); - - return JDate; }(); - })(); __webpack_exports__ = __webpack_exports__["default"]; @@ -685,4 +639,4 @@ __webpack_exports__ = __webpack_exports__["default"]; /******/ })() ; }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiamRhdGUuanMiLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87Ozs7Ozs7OztBQ1ZBQSxNQUFNLENBQUNDLE9BQVAsR0FBaUI7QUFDZkMsRUFBQUEsV0FBVyxFQUFFLENBQUMsU0FBRCxFQUFZLFVBQVosRUFBd0IsT0FBeEIsRUFBaUMsS0FBakMsRUFBd0MsUUFBeEMsRUFBa0QsUUFBbEQsRUFBNEQsS0FBNUQsRUFBbUUsTUFBbkUsRUFBMkUsS0FBM0UsRUFBa0YsSUFBbEYsRUFBd0YsTUFBeEYsRUFBZ0csT0FBaEcsQ0FERTtBQUVmQyxFQUFBQSxTQUFTLEVBQUUsQ0FBQyxJQUFELEVBQU8sSUFBUCxFQUFhLElBQWIsRUFBbUIsSUFBbkIsRUFBeUIsSUFBekIsRUFBK0IsR0FBL0IsRUFBb0MsR0FBcEMsQ0FGSTtBQUdmQyxFQUFBQSxVQUFVLEVBQUUsQ0FBQyxRQUFELEVBQVcsUUFBWCxFQUFxQixTQUFyQixFQUFnQyxVQUFoQyxFQUE0QyxVQUE1QyxFQUF3RCxNQUF4RCxFQUFnRSxNQUFoRSxDQUhHO0FBSWZDLEVBQUFBLGVBQWUsRUFBRSxTQUpGO0FBS2ZDLEVBQUFBLGFBQWEsRUFBRTtBQUxBLENBQWpCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUNBQTtBQUNBOztJQUVxQkU7Ozs7Ozs7V0FDbkI7QUFDQSwyQkFBc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5ndGgiLCJjb25jYXQiLCJyZXBsYWNlWWVhciIsImRhdGUiLCJtYXRjaCIsInJlcGxhY2UiLCJnZXRGdWxsWWVhciIsIlN0cmluZyIsInNsaWNlIiwicmVwbGFjZU1vbnRoIiwiZ2V0TW9udGgiLCJ6ZXJvTGVhZGluZ01vbnRoIiwidG9TdHJpbmciLCJyZXBsYWNlRGF5IiwiZ2V0RGF0ZSIsInplcm9MZWFkaW5nRGF0ZSIsImdldERheSIsImhlbHBlcnMiLCJKRGF0ZSIsIl9sZW4iLCJhcmd1bWVudHMiLCJhcmdzIiwiQXJyYXkiLCJfa2V5IiwiaXNBcnJheSIsIkRhdGUiLCJpbnB1dCIsIkVycm9yIiwibWFwIiwibnVtIiwicGFyc2VJbnQiLCJfZCIsInRvR3JlZ29yaWFuIiwidG9KYWxhbGkiLCJzZXRGdWxsWWVhciIsInNldE1vbnRoIiwiZml4ZWQiLCJfZml4ZWQiLCJfc2xpY2VkVG9BcnJheSIsInNldERhdGUiLCJmb3JtYXQiLCJyZXN1bHQiLCJqdWxpYW5EYXRlIiwiamRhdGUiLCJ0b19qYWxhbGkiLCJnZGF0ZSIsInRvX2dyZWdvcmlhbiIsImlzTGVhcFllYXIiLCJkYXlzSW5Nb250aCIsImNhbGNlZFllYXIiLCJjYWxjZWRNb250aCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/lib/jdate.min.js b/lib/jdate.min.js index e12aa67..60f3557 100644 --- a/lib/jdate.min.js +++ b/lib/jdate.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("JDate",[],t):"object"==typeof exports?exports.JDate=t():e.JDate=t()}(this,(function(){return(()=>{var e={843:e=>{e.exports={MONTH_NAMES:["فروردین","اردیبهشت","خرداد","تیر","امرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],ABBR_DAYS:["۱ش","۲ش","۳ش","۴ش","۵ش","ج","ش"],DAYS_NAMES:["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه"],GREGORIAN_EPOCH:1721425.5,PERSIAN_EPOCH:1948320.5}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{"use strict";r.d(n,{default:()=>p});var e=r(843);function t(e,t){return e-Math.floor(e/t)*t}function a(e){return e&&1===e.length?"0".concat(e):e}function o(e,t){var r=e.match(/[yY]+/);if(!r)return e;switch(r[0]){case"YYYY":case"YYY":return o(e.replace(r,t.getFullYear()),t);case"YY":return o(e.replace(r,String(t.getFullYear()).slice(2)),t);default:return e}}function i(t,r){var n=t.match(/[mM]+/);if(!n)return t;switch(n[0]){case"M":return i(t.replace(n,r.getMonth()),r);case"MM":var o=a(r.getMonth().toString());return i(t.replace(n,o),r);case"MMM":case"MMMM":return i(t.replace(n,e.MONTH_NAMES[r.getMonth()-1]),r);default:return t}}function u(t,r){var n=t.match(/[dD]+/);if(!n)return t;switch(n[0]){case"D":return u(t.replace(n,r.getDate()),r);case"DD":var o=a(r.getDate().toString());return u(t.replace(n,o),r);case"d":case"dd":return u(t.replace(n,e.ABBR_DAYS[r.getDay()]),r);case"ddd":case"dddd":return u(t.replace(n,e.DAYS_NAMES[r.getDay()]),r);default:return t}}function l(e,t){for(var r=0;r0?474:473))%2820+474+38)%2816<682}},{key:"persianToJulian",value:function(r,n,a){var o=r-(r>=0?474:473),i=474+t(o,2820);return a+(n<=7?31*(n-1):30*(n-1)+6)+Math.floor((682*i-110)/2816)+365*(i-1)+1029983*Math.floor(o/2820)+(e.PERSIAN_EPOCH-1)}},{key:"julianToPersian",value:function(e){var n,a=Math.floor(e)+.5,o=a-r.persianToJulian(475,1,1),i=Math.floor(o/1029983),u=t(o,1029983);if(1029982===u)n=2820;else{var l=Math.floor(u/366),f=t(u,366);n=Math.floor((2134*l+2816*f+2815)/1028522)+l+1}var s=n+2820*i+474;s<=0&&(s-=1);var c=a-r.persianToJulian(s,1,1)+1,h=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30);return[s,h,a-r.persianToJulian(s,h,1)+1]}},{key:"persianToGregorian",value:function(e,t,n){var a=r.persianToJulian(e,t,n);return r.julianToGregorian(a)}},{key:"gregorianToPersian",value:function(e,t,n){var a=r.gregorianToJulian(e,t,n);return r.julianToPersian(a)}}],null&&l(n.prototype,null),a&&l(n,a),r}();function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r12||t<=0){var r=Math.floor((t-1)/12);return[e-r,t-12*r]}return[e,t]}(this.getFullYear(),parseInt(e,10)),a=(r=2,function(e){if(Array.isArray(e))return e}(t=n)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(t,r)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return this.date[0]=a[0],this.date[1]=a[1],this.input=this.toGregorian(),this}},{key:"getDate",value:function(){return this.date[2]}},{key:"setDate",value:function(e){return this.date[2]=parseInt(e,10),this.input=this.toGregorian(),this}},{key:"getDay",value:function(){return this._d.getDay()}},{key:"format",value:function(e){var t=o(e,this);return u(t=i(t,this),this)}}])&&h(t.prototype,r),n&&h(t,n),e}()})(),n.default})()})); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiamRhdGUubWluLmpzIiwibWFwcGluZ3MiOiJDQUFBLFNBQTJDQSxFQUFNQyxHQUMxQixpQkFBWkMsU0FBMEMsaUJBQVhDLE9BQ3hDQSxPQUFPRCxRQUFVRCxJQUNRLG1CQUFYRyxRQUF5QkEsT0FBT0MsSUFDOUNELE9BQU8sUUFBUyxHQUFJSCxHQUNNLGlCQUFaQyxRQUNkQSxRQUFlLE1BQUlELElBRW5CRCxFQUFZLE1BQUlDLElBUmxCLENBU0dLLE1BQU0sV0FDVCxNLHFCQ1ZBSCxFQUFPRCxRQUFVLENBQ2ZLLFlBQWEsQ0FBQyxVQUFXLFdBQVksUUFBUyxNQUFPLFNBQVUsU0FBVSxNQUFPLE9BQVEsTUFBTyxLQUFNLE9BQVEsU0FDN0dDLFVBQVcsQ0FBQyxLQUFNLEtBQU0sS0FBTSxLQUFNLEtBQU0sSUFBSyxLQUMvQ0MsV0FBWSxDQUFDLFNBQVUsU0FBVSxVQUFXLFdBQVksV0FBWSxPQUFRLFFBQzVFQyxnQkFBaUIsVUFDakJDLGNBQWUsYUNKYkMsRUFBMkIsR0FHL0IsU0FBU0MsRUFBb0JDLEdBRTVCLElBQUlDLEVBQWVILEVBQXlCRSxHQUM1QyxRQUFxQkUsSUFBakJELEVBQ0gsT0FBT0EsRUFBYWIsUUFHckIsSUFBSUMsRUFBU1MsRUFBeUJFLEdBQVksQ0FHakRaLFFBQVMsSUFPVixPQUhBZSxFQUFvQkgsR0FBVVgsRUFBUUEsRUFBT0QsUUFBU1csR0FHL0NWLEVBQU9ELFFDcEJmVyxFQUFvQkssRUFBSSxDQUFDaEIsRUFBU2lCLEtBQ2pDLElBQUksSUFBSUMsS0FBT0QsRUFDWE4sRUFBb0JRLEVBQUVGLEVBQV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ZWFyIiwiU3RyaW5nIiwic2xpY2UiLCJyZXBsYWNlTW9udGgiLCJnZXRNb250aCIsInplcm9MZWFkaW5nTW9udGgiLCJ0b1N0cmluZyIsInJlcGxhY2VEYXkiLCJnZXREYXRlIiwiemVyb0xlYWRpbmdEYXRlIiwiZ2V0RGF5IiwiQ29udmVydGVyIiwieWVhciIsIm1vbnRoIiwiZGF5IiwicGFkIiwibGVhcEdyZWdvcmlhbiIsImpkIiwid2pkIiwiZGVwb2NoIiwicXVhZHJpY2VudCIsImRxYyIsImNlbnQiLCJkY2VudCIsInF1YWQiLCJkcXVhZCIsInlpbmRleCIsImxlYXBhZGoiLCJ5ZWFyZGF5IiwiZ3JlZ29yaWFuVG9KdWxpYW4iLCJlcGJhc2UiLCJlcHllYXIiLCJ5Y3ljbGUiLCJuamQiLCJwZXJzaWFuVG9KdWxpYW4iLCJjeWNsZSIsImN5ZWFyIiwiYXV4MSIsImF1eDIiLCJ5ZGF5IiwiY2VpbCIsImp1bGlhbiIsImp1bGlhblRvR3JlZ29yaWFuIiwianVsaWFuVG9QZXJzaWFuIiwiSkRhdGUiLCJhcmdzIiwiQXJyYXkiLCJpc0FycmF5IiwiRGF0ZSIsImlucHV0IiwiRXJyb3IiLCJtYXAiLCJudW0iLCJwYXJzZUludCIsIl9kIiwidG9HcmVnb3JpYW4iLCJ0b0phbGFsaSIsImp1bGlhbkRhdGUiLCJnZGF0ZSIsImxlYXBQZXJzaWFuIiwiY2FsY2VkWWVhciIsImNhbGNlZE1vbnRoIiwiaXNMZWFwWWVhciIsImZpeGVkIiwieWVhckRpZmYiLCJoZWxwZXJzIiwiZm9ybWF0IiwicmVzdWx0Il0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("JDate",[],e):"object"==typeof exports?exports.JDate=e():t.JDate=e()}(this,(()=>(()=>{var t={51:t=>{t.exports={MONTH_NAMES:["فروردین","اردیبهشت","خرداد","تیر","امرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],ABBR_DAYS:["۱ش","۲ش","۳ش","۴ش","۵ش","ج","ش"],DAYS_NAMES:["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه"],GREGORIAN_EPOCH:1721425.5,PERSIAN_EPOCH:1948320.5,NON_LEAP_CORRECTION:[1502,1601,1634,1667,1700,1733,1766,1799,1832,1865,1898,1931,1964,1997,2030,2059,2063,2096,2129,2158,2162,2191,2195,2224,2228,2257,2261,2290,2294,2323,2327,2356,2360,2389,2393,2422,2426,2455,2459,2488,2492,2521,2525,2554,2558,2587,2591,2620,2624,2653,2657,2686,2690,2719,2723,2748,2752,2756,2781,2785,2789,2818,2822,2847,2851,2855,2880,2884,2888,2913,2917,2921,2946,2950,2954,2979,2983,2987]}}},e={};function r(n){var a=e[n];if(void 0!==a)return a.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};return(()=>{"use strict";r.d(n,{default:()=>g});var t=r(51);function e(t,e){return t-Math.floor(t/e)*e}function a(t){return t&&1===t.length?"0".concat(t):t}function o(t,e){var r=t.match(/[yY]+/);if(!r)return t;switch(r[0]){case"YYYY":case"YYY":return o(t.replace(r,e.getFullYear()),e);case"YY":return o(t.replace(r,String(e.getFullYear()).slice(2)),e);default:return t}}function i(e,r){var n=e.match(/[mM]+/);if(!n)return e;switch(n[0]){case"M":return i(e.replace(n,r.getMonth()),r);case"MM":var o=a(r.getMonth().toString());return i(e.replace(n,o),r);case"MMM":case"MMMM":return i(e.replace(n,t.MONTH_NAMES[r.getMonth()-1]),r);default:return e}}function u(e,r){var n=e.match(/[dD]+/);if(!n)return e;switch(n[0]){case"D":return u(e.replace(n,r.getDate()),r);case"DD":var o=a(r.getDate().toString());return u(e.replace(n,o),r);case"d":case"dd":return u(e.replace(n,t.ABBR_DAYS[r.getDay()]),r);case"ddd":case"dddd":return u(e.replace(n,t.DAYS_NAMES[r.getDay()]),r);default:return e}}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function f(t,e){for(var r=0;r=0?474:473),i=474+e(o,2820);return a+(n<=7?31*(n-1):30*(n-1)+6)+Math.floor((682*i-110)/2816)+365*(i-1)+1029983*Math.floor(o/2820)+(t.PERSIAN_EPOCH-1)}},{key:"julianToPersian",value:function(t){var n,a=Math.floor(t)+.5,o=a-r.persianToJulian(475,1,1),i=Math.floor(o/1029983),u=e(o,1029983);if(1029982===u)n=2820;else{var l=Math.floor(u/366),f=e(u,366);n=Math.floor((2134*l+2816*f+2815)/1028522)+l+1}var c=n+2820*i+474;c<=0&&(c-=1);var s=a-r.persianToJulian(c,1,1)+1,y=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30);return[c,y,a-r.persianToJulian(c,y,1)+1]}},{key:"persianToGregorian",value:function(t,e,n){var a=r.persianToJulian(t,e,n);return r.julianToGregorian(a)}},{key:"gregorianToPersian",value:function(t,e,n){var a=r.gregorianToJulian(t,e,n);return r.julianToPersian(a)}}],null&&f(n.prototype,null),a&&f(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}();function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r12||e<=0){var r=Math.floor((e-1)/12);return[t-r,e-12*r]}return[t,e]}(this.getFullYear(),parseInt(t,10)),r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,a,o,i,u=[],l=!0,f=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);l=!0);}catch(t){f=!0,a=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(f)throw a}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return this.date[0]=r[0],this.date[1]=r[1],this.input=this.toGregorian(),this}},{key:"getDate",value:function(){return this.date[2]}},{key:"setDate",value:function(t){return this.date[2]=parseInt(t,10),this.input=this.toGregorian(),this}},{key:"getDay",value:function(){return this._d.getDay()}},{key:"format",value:function(t){var e=o(t,this);return u(e=i(e,this),this)}}])&&h(e.prototype,r),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}()})(),n.default})())); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiamRhdGUubWluLmpzIiwibWFwcGluZ3MiOiJDQUFBLFNBQTJDQSxFQUFNQyxHQUMxQixpQkFBWkMsU0FBMEMsaUJBQVhDLE9BQ3hDQSxPQUFPRCxRQUFVRCxJQUNRLG1CQUFYRyxRQUF5QkEsT0FBT0MsSUFDOUNELE9BQU8sUUFBUyxHQUFJSCxHQUNNLGlCQUFaQyxRQUNkQSxRQUFlLE1BQUlELElBRW5CRCxFQUFZLE1BQUlDLEdBQ2pCLENBVEQsQ0FTR0ssTUFBTSxJL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CI6IiJ9 \ No newline at end of file diff --git a/package.json b/package.json index 044a1e0..ea2cfee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jalali-date", - "version": "1.1.4", + "version": "1.1.5", "description": "A Jalali to Gregorian converter with support of formatting output", "scripts": { "start": "webpack --progress --colors --watch --env dev",