diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index 6faad0fbd..bb26b58ad 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -53,7 +53,6 @@ import requests from pytz import timezone -import dateutil.parser as dtparser import flask from flask import g, request, Response @@ -230,7 +229,7 @@ def is_iso_formated(date: str, convert=False) -> bool or datetime.datetime or No """ try: - date: datetime.datetime = dtparser.isoparse(date) + date: datetime.datetime = datetime.datetime.fromisoformat(date) return date if convert else True except (dtparser.ParserError, ValueError, TypeError): return None if convert else False diff --git a/app/static/js/assiduites.js b/app/static/js/assiduites.js index 442a0207d..0c8edc610 100644 --- a/app/static/js/assiduites.js +++ b/app/static/js/assiduites.js @@ -32,6 +32,17 @@ Object.defineProperty(String.prototype, "capitalize", { }, enumerable: false, }); + +const DatePrecisions = [ + "year", + "month", + "day", + "hour", + "minute", + "second", + "millisecond", +]; + // <<== Outils ==>> Object.defineProperty(Array.prototype, "reversed", { value: function () { @@ -126,7 +137,7 @@ function validateSelectors(btn) { } function onlyAbs() { - if (getDate() > moment()) { + if (getDate() > Date.now()) { document .querySelectorAll(".rbtn.present, .rbtn.retard") .forEach((el) => el.remove()); @@ -268,8 +279,8 @@ function executeMassActionQueue() { */ const tlTimes = getTimeLineTimes(); let assiduite = { - date_debut: tlTimes.deb.format(), - date_fin: tlTimes.fin.format(), + date_debut: tlTimes.deb.toIsoUtcString(), + date_fin: tlTimes.fin.toIsoUtcString(), }; assiduite = setModuleImplId(assiduite); @@ -613,19 +624,10 @@ function getNearestWorkDay(date) { } function verifyDateInSemester() { - const date = new moment.tz( - document.querySelector("#tl_date").value, - TIMEZONE - ); + const date = getDate(); const periodSemester = getFormSemestreDates(); - - return date.isBetween( - periodSemester.deb, - periodSemester.fin, - undefined, - "[]" - ); + return date.isBetween(periodSemester.deb, periodSemester.fin, "[]"); } /** @@ -664,8 +666,8 @@ function getAssiduitesOnDateChange() { * @param {String} separator le séparateur de la date intelligible (01/01/2000 {separtor} 10:00) * @returns {String} la date intelligible */ -function formatDateModal(str, separator = "·") { - return new moment.tz(str, TIMEZONE).format(`DD/MM/Y ${separator} HH:mm`); +function formatDateModal(str, separator = " ") { + return new Date(str).format("DD/MM/Y HH:mm").replace(" ", separator); } /** @@ -705,8 +707,8 @@ function verifyNonWorkDays(day, nonWorkdays) { * Fonction qui vérifie si une période est dans un interval * Objet période / interval * { - * deb: moment.tz(), - * fin: moment.tz(), + * deb: Date, + * fin: Date, * } * @param {object} period * @param {object} interval @@ -718,7 +720,7 @@ function hasTimeConflict(period, interval) { /** * On récupère la période de la timeline - * @returns {deb : moment.tz(), fin: moment.tz()} + * @returns {deb : Date, fin: Date)} */ function getTimeLineTimes() { //getPeriodValues() -> retourne la position de la timeline [a,b] avec a et b des number @@ -726,11 +728,11 @@ function getTimeLineTimes() { //On récupère la date const dateiso = document.querySelector("#tl_date").value; - //On génère des objets temps (moment.tz) + //On génère des objets temps values = values.map((el) => { el = toTime(el).replace("h", ":"); el = `${dateiso}T${el}`; - return moment.tz(el, TIMEZONE); + return new Date(el); }); return { deb: values[0], fin: values[1] }; @@ -744,8 +746,8 @@ function getTimeLineTimes() { function isConflictSameAsPeriod(conflict, period = undefined) { const tlTimes = period == undefined ? getTimeLineTimes() : period; const clTimes = { - deb: moment.tz(conflict.date_debut, TIMEZONE), - fin: moment.tz(conflict.date_fin, TIMEZONE), + deb: new Date(conflict.date_debut), + fin: new Date(conflict.date_fin), }; return tlTimes.deb.isSame(clTimes.deb) && tlTimes.fin.isSame(clTimes.fin); } @@ -815,9 +817,9 @@ function toIsoString(date) { } /** - * Transforme un temps numérique en une date moment.tz + * Transforme un temps numérique en une date * @param {number} nb - * @returns {moment.tz} Une date formée du temps donné et de la date courante + * @returns {Date} Une date formée du temps donné et de la date courante */ function numberTimeToDate(nb) { time = toTime(nb).replace("h", ":"); @@ -825,7 +827,7 @@ function numberTimeToDate(nb) { datetime = `${date}T${time}`; - return moment.tz(datetime, TIMEZONE); + return new Date(datetime); } // <<== Gestion des assiduités ==>> @@ -885,8 +887,8 @@ function getAssiduitesFromEtuds(clear, deb, fin) { function createAssiduite(etat, etudid) { const tlTimes = getTimeLineTimes(); let assiduite = { - date_debut: tlTimes.deb.format(), - date_fin: tlTimes.fin.format(), + date_debut: tlTimes.deb.toIsoUtcString(), + date_fin: tlTimes.fin.toIsoUtcString(), etat: etat, }; @@ -1067,10 +1069,11 @@ function getAssiduitesConflict(etudid, periode) { return etudAssiduites.filter((assi) => { const interval = { - deb: moment.tz(assi.date_debut, TIMEZONE), - fin: moment.tz(assi.date_fin, TIMEZONE), + deb: new Date(assi.date_debut), + fin: new Date(assi.date_fin), }; - return hasTimeConflict(periode, interval); + const test = hasTimeConflict(periode, interval); + return test; }); } @@ -1085,21 +1088,21 @@ function getLastAssiduiteOfPrevDate(etudid) { return ""; } const period = { - deb: moment.tz(getPrevDate(), TIMEZONE), - fin: moment.tz(getDate(), TIMEZONE), + deb: getPrevDate(), + fin: getDate(), }; const prevAssiduites = etudAssiduites .filter((assi) => { const interval = { - deb: moment.tz(assi.date_debut, TIMEZONE), - fin: moment.tz(assi.date_fin, TIMEZONE), + deb: new Date(assi.date_debut), + fin: new Date(assi.date_fin), }; return hasTimeConflict(period, interval); }) .sort((a, b) => { - const a_fin = moment.tz(a.date_fin, TIMEZONE); - const b_fin = moment.tz(b.date_fin, TIMEZONE); + const a_fin = new Date(a.date_fin); + const b_fin = new Date(b.date_fin); return b_fin < a_fin; }); @@ -1232,8 +1235,8 @@ function assiduiteAction(element) { assiduites[etudid], getTimeLineTimes(), { - deb: new moment.tz(getDate(), TIMEZONE), - fin: new moment.tz(getNextDate(), TIMEZONE), + deb: getDate(), + fin: getNextDate(), } ); const update = (assi) => { @@ -1377,7 +1380,6 @@ function insertEtudRow(etud, index, output = false) { date_fin: null, prevAssiduites: prevAssiduite, }; - if (conflict.length > 0) { assiduite.etatAssiduite = conflict[0].etat; @@ -1545,8 +1547,8 @@ function getFormSemestreDates() { const dateFin = document.getElementById("formsemestre_date_fin").textContent; return { - deb: dateDeb, - fin: dateFin, + deb: new Date(dateDeb), + fin: new Date(dateFin), }; } @@ -1613,8 +1615,10 @@ function getJustificatifFromPeriod(date, etudid, update) { url: getUrl() + `/api/justificatifs/${etudid}/query?date_debut=${date.deb - .add(1, "s") - .format()}&date_fin=${date.fin.subtract(1, "s").format()}`, + .add(1, "seconds") + .toIsoUtcString()}&date_fin=${date.fin + .add(-1, "seconds") + .toIsoUtcString()}`, success: (data) => { update(data); }, @@ -1646,8 +1650,8 @@ function fastJustify(assiduite) { } const period = { - deb: new moment.tz(assiduite.date_debut, TIMEZONE), - fin: new moment.tz(assiduite.date_fin, TIMEZONE), + deb: new Date(assiduite.date_debut), + fin: new Date(assiduite.date_fin), }; const action = (justifs) => { //créer un nouveau justificatif @@ -1660,8 +1664,8 @@ function fastJustify(assiduite) { //créer justificatif const justif = { - date_debut: new moment.tz(assiduite.date_debut, TIMEZONE).format(), - date_fin: new moment.tz(assiduite.date_fin, TIMEZONE).format(), + date_debut: new Date(assiduite.date_debut).toIsoUtcString(), + date_fin: new Date(assiduite.date_fin).toIsoUtcString(), raison: raison, etat: etat, }; diff --git a/app/static/js/date_utils.js b/app/static/js/date_utils.js new file mode 100644 index 000000000..d22487d32 --- /dev/null +++ b/app/static/js/date_utils.js @@ -0,0 +1,451 @@ +Object.defineProperty(Date.prototype, "startOf", { + /** + * Génère u la date à la plus petite valeur pour la précision donnée. + * @param {string} precision - La précision souhaitée (year, month, day, hours, minutes, seconds, milliseconds). + * @returns {Date} - Une nouvelle date ajustée. + */ + value: function (precision) { + const newDate = this.clone(); + switch (precision) { + case "year": + newDate.setMonth(0); + case "month": + newDate.setDate(1); + case "day": + newDate.setHours(0); + case "hours": + newDate.setMinutes(0); + case "minutes": + newDate.setSeconds(0); + case "seconds": + newDate.setMilliseconds(0); + break; + case "milliseconds": + break; + default: + throw new Error( + `Invalid precision for startOf function [${precision}]` + ); + } + return newDate; + }, +}); + +Object.defineProperty(Date.prototype, "endOf", { + /** + * Ajuste la date à la plus grande valeur pour la précision donnée. + * @param {string} precision - La précision souhaitée (year, month, day, hours, minutes, seconds, milliseconds). + * @returns {Date} - Une nouvelle date ajustée. + */ + value: function (precision) { + const newDate = this.clone(); + switch (precision) { + case "year": + newDate.setMonth(11); // Décembre est le 11ème mois (0-indexé) + case "month": + newDate.setDate(0); // Le jour 0 du mois suivant est le dernier jour du mois courant + newDate.setMonth(newDate.getMonth() + 1); + case "day": + newDate.setHours(23); // 23 heures est la dernière heure de la journée + case "hours": + newDate.setMinutes(59); // 59 minutes est la dernière minute de l'heure + case "minutes": + newDate.setSeconds(59); // 59 secondes est la dernière seconde de la minute + case "seconds": + newDate.setMilliseconds(999); // 999 millisecondes est la dernière milliseconde de la seconde + break; + case "milliseconds": + // Rien à faire pour les millisecondes + break; + default: + throw new Error("Invalid precision for endOf function"); + } + return newDate; + }, +}); + +Object.defineProperty(Date.prototype, "isBefore", { + /** + * Retourne vrai si la date est située avant la date fournie + * @param {Date} date + * @returns {boolean} + */ + value: function (date) { + return this.valueOf() < date.valueOf(); + }, +}); +Object.defineProperty(Date.prototype, "isAfter", { + /** + * Retourne vrai si la date est située après la date fournie + * @param {Date} date + * @returns {boolean} + */ + value: function (date) { + return this.valueOf() > date.valueOf(); + }, +}); + +Object.defineProperty(Date.prototype, "isSame", { + /** + * Retourne vrai si les dates sont les mêmes + * @param {Date} date + * @param {string} precision default : "milliseconds" + * @returns boolean + */ + value: function (date, precision = "milliseconds") { + return ( + this.startOf(precision).valueOf() == date.startOf(precision).valueOf() + ); + }, +}); + +Object.defineProperty(Date.prototype, "isBetween", { + /** + * Vérifie si la date est comprise dans une période avec une précision et une inclusivité optionnelles + * @param {Date} deb - La date de début de la période + * @param {Date} fin - La date de fin de la période + * @param {String} bornes - L'inclusivité/exclusivité de la comparaison ("[]", "()", "[)", "(]") + * - bornes incluses : [] + * - bornes excluses : () + * - borne gauche incluse et borne droit excluse : [) + * - borne gauche excluse et borne droit incluse : (] + */ + value: function (deb, fin, bornes = "[]") { + // Ajuste la date actuelle, la date de début et la date de fin à la précision spécifiée + + // Vérifie les bornes en fonction de l'inclusivité/exclusivité spécifiée dans 'bornes' + const check_deb = + bornes[0] === "(" + ? this.valueOf() > deb.valueOf() + : this.valueOf() >= deb.valueOf(); + const check_fin = + bornes[1] === ")" + ? fin.valueOf() > this.valueOf() + : fin.valueOf() >= this.valueOf(); + + return check_deb && check_fin; + }, +}); + +Object.defineProperty(Date.prototype, "toIsoUtcString", { + /** + * @returns date au format iso utc (yyyy-mm-ddThh:MM±oo:oo:oo) + */ + value: function () { + const date = this; + var tzo = -date.getTimezoneOffset(), + dif = tzo >= 0 ? "+" : "-", + pad = function (num) { + return (num < 10 ? "0" : "") + num; + }; + + return ( + date.getFullYear() + + "-" + + pad(date.getMonth() + 1) + + "-" + + pad(date.getDate()) + + "T" + + pad(date.getHours()) + + ":" + + pad(date.getMinutes()) + + ":" + + pad(date.getSeconds()) + + dif + + pad(Math.floor(Math.abs(tzo) / 60)) + + ":" + + pad(Math.abs(tzo) % 60) + ); + }, +}); + +Object.defineProperty(Date.prototype, "clone", { + /** + * @returns Retourne une copie de la date (copie non liée) + */ + value: function () { + return structuredClone(this); + }, +}); + +Object.defineProperty(Date.prototype, "format", { + value: function (formatString) { + switch (formatString) { + case "DD/MM/Y HH:mm": + return this.toLocaleString("fr-FR", { + day: "2-digit", + month: "2-digit", + year: "2-digit", + hour: "2-digit", + minute: "2-digit", + hour12: false, + }); + case "DD/MM/YYYY HH:mm": + return this.toLocaleString("fr-FR", { + day: "2-digit", + month: "2-digit", + year: "numeric", + hour: "2-digit", + minute: "2-digit", + hour12: false, + }); + + case "YYYY-MM-DDTHH:mm": + let iso = this.toIsoUtcString(); + // slice : YYYY-MM-DDTHH + // slice + 3 : YYYY-MM-DDTHH:mm + return iso.slice(0, iso.indexOf(":") + 3); + default: + return this.toIsoUtcString(); + } + }, +}); + +Object.defineProperty(Date.prototype, "add", { + /** + * Ajoute une valeur spécifiée à un élément de la date. + * @param {number} value - La valeur à ajouter. + * @param {string} type - Le type de la valeur (year, month, day, hours, minutes, seconds). + */ + value: function (value, type) { + switch (type) { + case "years": + this.setFullYear(this.getFullYear() + value); + break; + case "months": + this.setMonth(this.getMonth() + value); + break; + case "days": + this.setDate(this.getDate() + value); + break; + case "hours": + this.setHours(this.getHours() + value); + break; + case "minutes": + this.setMinutes(this.getMinutes() + value); + break; + case "seconds": + this.setSeconds(this.getSeconds() + value); + break; + default: + throw new Error( + `Invalid type for adding to date | type : ${type} value : ${value}` + ); + } + return this; // Return the modified date + }, +}); + +class Duration { + /** + * Constructeur de la classe Duration. + * @param {Date} start - La date de début de la période. + * @param {Date} end - La date de fin de la période. + */ + constructor(start, end) { + this.start = start; // Stocke la date de début. + this.end = end; // Stocke la date de fin. + this.duration = end - start; // Calcule la durée en millisecondes entre les deux dates. + } + + /** + * Calcule le nombre d'années entre les deux dates et arrondit le résultat à quatre décimales. + * @return {number} Le nombre d'années arrondi à quatre décimales. + */ + get years() { + const startYear = this.start.getFullYear(); // Obtient l'année de la date de début. + const endYear = this.end.getFullYear(); // Obtient l'année de la date de fin. + // Calcule la différence en années et arrondit à quatre décimales. + return parseFloat((endYear - startYear).toFixed(4)); + } + + /** + * Calcule le nombre de mois entre les deux dates, en tenant compte des années et des jours, et arrondit le résultat à quatre décimales. + * @return {number} Le nombre de mois arrondi à quatre décimales. + */ + get months() { + const years = this.years; // Nombre d'années complètes. + // Calcule la différence en mois, en ajoutant la différence en jours divisée par 30 pour une approximation. + const months = + years * 12 + + (this.end.getMonth() - this.start.getMonth()) + + (this.end.getDate() - this.start.getDate()) / 30; + // Arrondit à quatre décimales. + return parseFloat(months.toFixed(4)); + } + + /** + * Calcule le nombre de jours entre les deux dates et arrondit le résultat à quatre décimales. + * @return {number} Le nombre de jours arrondi à quatre décimales. + */ + get days() { + // Convertit la durée en millisecondes en jours et arrondit à quatre décimales. + return parseFloat((this.duration / (24 * 60 * 60 * 1000)).toFixed(4)); + } + + /** + * Calcule le nombre d'heures entre les deux dates et arrondit le résultat à quatre décimales. + * @return {number} Le nombre d'heures arrondi à quatre décimales. + */ + get hours() { + // Convertit la durée en millisecondes en heures et arrondit à quatre décimales. + return parseFloat((this.duration / (60 * 60 * 1000)).toFixed(4)); + } + + /** + * Calcule le nombre de minutes entre les deux dates et arrondit le résultat à quatre décimales. + * @return {number} Le nombre de minutes arrondi à quatre décimales. + */ + get minutes() { + // Convertit la durée en millisecondes en minutes et arrondit à quatre décimales. + return parseFloat((this.duration / (60 * 1000)).toFixed(4)); + } + + /** + * Calcule le nombre de secondes entre les deux dates et arrondit le résultat à quatre décimales. + * @return {number} Le nombre de secondes arrondi à quatre décimales. + */ + get seconds() { + // Convertit la durée en millisecondes en secondes et arrondit à quatre décimales. + return parseFloat((this.duration / 1000).toFixed(4)); + } + + /** + * Obtient le nombre de millisecondes entre les deux dates et arrondit le résultat à quatre décimales. + * @return {number} Le nombre de millisecondes arrondi à quatre décimales. + */ + get milliseconds() { + // Arrondit la durée totale en millisecondes à quatre décimales. + return parseFloat(this.duration.toFixed(4)); + } +} + +class ScoDocDateTimePicker extends HTMLElement { + constructor() { + super(); + // Définir si le champ est requis + this.required = this.hasAttribute("required"); + + // Initialiser le shadow DOM + const shadow = this.attachShadow({ mode: "open" }); + + // Créer l'input pour la date + const dateInput = document.createElement("input"); + dateInput.type = "date"; + dateInput.id = "date"; + + // Créer l'input pour l'heure + const timeInput = document.createElement("input"); + timeInput.type = "time"; + timeInput.id = "time"; + + // Ajouter les inputs dans le shadow DOM + shadow.appendChild(dateInput); + shadow.appendChild(timeInput); + + // Gestionnaires d'événements pour la mise à jour de la valeur + dateInput.addEventListener("change", () => this.updateValue()); + timeInput.addEventListener("change", () => this.updateValue()); + + // Style CSS pour les inputs + const style = document.createElement("style"); + style.textContent = ` + input { + display: inline-block; + } + input:invalid { + border: 1px solid red; + } + `; + + // Ajouter le style au shadow DOM + shadow.appendChild(style); + } + + connectedCallback() { + // Récupérer l'attribut 'name' + this.name = this.getAttribute("name"); + + // Créer un input caché pour la valeur datetime + this.hiddenInput = document.createElement("input"); + this.hiddenInput.type = "hidden"; + this.hiddenInput.name = this.name; + this.appendChild(this.hiddenInput); + + // Gérer la soumission du formulaire + this.closest("form")?.addEventListener("submit", (e) => { + if (!this.validate()) { + e.preventDefault(); // Empêcher la soumission si non valide + this.dispatchEvent( + new Event("invalid", { bubbles: true, cancelable: true }) + ); + } else { + // Mettre à jour la valeur de l'input caché avant la soumission + this.hiddenInput.value = this.isValid() + ? this.valueAsDate.toIsoUtcString() + : ""; + } + }); + } + + // Vérifier si la valeur forme une date valide + isValid() { + return !Number.isNaN(this.valueAsDate.getTime()); + } + + // Valider l'élément + validate() { + if (this.required && !this.isValid()) { + return false; + } + return true; + } + + // Mettre à jour la valeur interne + updateValue() { + const dateInput = this.shadowRoot.querySelector("#date"); + const timeInput = this.shadowRoot.querySelector("#time"); + this._value = `${dateInput.value}T${timeInput.value}`; + this.dispatchEvent(new Event("change", { bubbles: true })); + + // Appliquer le style 'invalid' si nécessaire + dateInput.classList.toggle("invalid", this.required && !this.isValid()); + timeInput.classList.toggle("invalid", this.required && !this.isValid()); + } + + // Getter pour obtenir la valeur actuelle. + get value() { + return this._value; + } + + // Setter pour définir la valeur. Sépare la valeur en date et heure et les définit individuellement. + set value(val) { + let [date, time] = val.split("T"); + this.shadowRoot.querySelector("#date").value = date; + + if ((time.match(/0/g) || []).length > 1) { + time = time.slice(0, time.indexOf(":") + 3); + } + + this.shadowRoot.querySelector("#time").value = time; + this._value = val; + } + + // Getter pour obtenir la valeur en tant qu'objet Date. + get valueAsDate() { + return new Date(this._value); + } + + // Setter pour définir la valeur à partir d'un objet Date. + set valueAsDate(dateVal) { + // Formatage de l'objet Date en string et mise à jour de la valeur. + this.value = `${dateVal.getFullYear()}-${String( + dateVal.getMonth() + 1 + ).padStart(2, "0")}-${String(dateVal.getDate()).padStart(2, "0")}T${String( + dateVal.getHours() + ).padStart(2, "0")}:${String(dateVal.getMinutes()).padStart(2, "0")}`; + } +} + +// Définition du nouvel élément personnalisé 'scodoc-datetime'. +customElements.define("scodoc-datetime", ScoDocDateTimePicker); diff --git a/app/static/libjs/moment-2.29.4.min.js b/app/static/libjs/moment-2.29.4.min.js deleted file mode 100644 index 3427886d1..000000000 --- a/app/static/libjs/moment-2.29.4.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function f(){return H.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function o(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i>>0,s=0;sAe(e)?(r=e+1,t-Ae(e)):(r=e,t);return{year:r,dayOfYear:n}}function qe(e,t,n){var s,i,r=ze(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+P(i=e.year()-1,t,n):r>P(e.year(),t,n)?(s=r-P(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function P(e,t,n){var s=ze(e,t,n),t=ze(e+1,t,n);return(Ae(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),t("week","w"),t("isoWeek","W"),n("week",5),n("isoWeek",5),v("w",p),v("ww",p,w),v("W",p),v("WW",p,w),Te(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=g(e)});function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),t("day","d"),t("weekday","e"),t("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),v("d",p),v("e",p),v("E",p),v("dd",function(e,t){return t.weekdaysMinRegex(e)}),v("ddd",function(e,t){return t.weekdaysShortRegex(e)}),v("dddd",function(e,t){return t.weekdaysRegex(e)}),Te(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:m(n).invalidWeekday=e}),Te(["d","e","E"],function(e,t,n,s){t[s]=g(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=k,et=k,tt=k;function nt(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=M(this.weekdaysMin(s,"")),n=M(this.weekdaysShort(s,"")),s=M(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function st(){return this.hours()%12||12}function it(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,st),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),it("a",!0),it("A",!1),t("hour","h"),n("hour",13),v("a",rt),v("A",rt),v("H",p),v("h",p),v("k",p),v("HH",p,w),v("hh",p,w),v("kk",p,w),v("hmm",ge),v("hmmss",we),v("Hmm",ge),v("Hmmss",we),D(["H","HH"],x),D(["k","kk"],function(e,t,n){e=g(e);t[x]=24===e?0:e}),D(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),D(["h","hh"],function(e,t,n){t[x]=g(e),m(n).bigHour=!0}),D("hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s)),m(n).bigHour=!0}),D("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i)),m(n).bigHour=!0}),D("Hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s))}),D("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i))});k=de("Hours",!0);var at,ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:Ue,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Xe,weekdaysShort:Qe,meridiemParse:/[ap]\.?m?\.?/i},R={},ut={};function lt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s=t-1)break;t--}r++}return at}function dt(t){var e;if(void 0===R[t]&&"undefined"!=typeof module&&module&&module.exports&&null!=t.match("^[^/\\\\]*$"))try{e=at._abbr,require("./locale/"+t),ct(e)}catch(e){R[t]=null}return R[t]}function ct(e,t){return e&&((t=o(t)?mt(e):ft(e,t))?at=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function ft(e,t){if(null===t)return delete R[e],null;var n,s=ot;if(t.abbr=e,null!=R[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=R[e]._config;else if(null!=t.parentLocale)if(null!=R[t.parentLocale])s=R[t.parentLocale]._config;else{if(null==(n=dt(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;s=n._config}return R[e]=new K(X(s,t)),ut[e]&&ut[e].forEach(function(e){ft(e.name,e.config)}),ct(e),R[e]}function mt(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return at;if(!a(e)){if(t=dt(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===m(e).overflow&&(t=t[O]<0||11We(t[Y],t[O])?b:t[x]<0||24P(r,u,l)?m(s)._overflowWeeks=!0:null!=h?m(s)._overflowWeekday=!0:(d=$e(r,a,o,u,l),s._a[Y]=d.year,s._dayOfYear=d.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[Y],n[Y]),(e._dayOfYear>Ae(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),h=Ze(i,0,e._dayOfYear),e._a[O]=h.getUTCMonth(),e._a[b]=h.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[x]&&0===e._a[T]&&0===e._a[N]&&0===e._a[Ne]&&(e._nextDay=!0,e._a[x]=0),e._d=(e._useUTC?Ze:je).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[x]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0)}}function Tt(e){if(e._f===f.ISO_8601)St(e);else if(e._f===f.RFC_2822)Ot(e);else{e._a=[],m(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],h=l.length,d=0;de.valueOf():e.valueOf()"}),i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},i.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},i.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},i.isLocal=function(){return!!this.isValid()&&!this._isUTC},i.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},i.isUtc=At,i.isUTC=At,i.zoneAbbr=function(){return this._isUTC?"UTC":""},i.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},i.dates=e("dates accessor is deprecated. Use date instead.",ke),i.months=e("months accessor is deprecated. Use month instead",Ge),i.years=e("years accessor is deprecated. Use year instead",Ie),i.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),i.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e,t={};return $(t,this),(t=Nt(t))._a?(e=(t._isUTC?l:W)(t._a),this._isDSTShifted=this.isValid()&&0= 2.6.0. You are using Moment.js " + - moment.version + - ". See momentjs.com" - ); - } - - /************************************ - Unpacking - ************************************/ - - function charCodeToInt(charCode) { - if (charCode > 96) { - return charCode - 87; - } else if (charCode > 64) { - return charCode - 29; - } - return charCode - 48; - } - - function unpackBase60(string) { - var i = 0, - parts = string.split("."), - whole = parts[0], - fractional = parts[1] || "", - multiplier = 1, - num, - out = 0, - sign = 1; - - // handle negative numbers - if (string.charCodeAt(0) === 45) { - i = 1; - sign = -1; - } - - // handle digits before the decimal - for (i; i < whole.length; i++) { - num = charCodeToInt(whole.charCodeAt(i)); - out = 60 * out + num; - } - - // handle digits after the decimal - for (i = 0; i < fractional.length; i++) { - multiplier = multiplier / 60; - num = charCodeToInt(fractional.charCodeAt(i)); - out += num * multiplier; - } - - return out * sign; - } - - function arrayToInt(array) { - for (var i = 0; i < array.length; i++) { - array[i] = unpackBase60(array[i]); - } - } - - function intToUntil(array, length) { - for (var i = 0; i < length; i++) { - array[i] = Math.round((array[i - 1] || 0) + array[i] * 60000); // minutes to milliseconds - } - - array[length - 1] = Infinity; - } - - function mapIndices(source, indices) { - var out = [], - i; - - for (i = 0; i < indices.length; i++) { - out[i] = source[indices[i]]; - } - - return out; - } - - function unpack(string) { - var data = string.split("|"), - offsets = data[2].split(" "), - indices = data[3].split(""), - untils = data[4].split(" "); - - arrayToInt(offsets); - arrayToInt(indices); - arrayToInt(untils); - - intToUntil(untils, indices.length); - - return { - name: data[0], - abbrs: mapIndices(data[1].split(" "), indices), - offsets: mapIndices(offsets, indices), - untils: untils, - population: data[5] | 0, - }; - } - - /************************************ - Zone object - ************************************/ - - function Zone(packedString) { - if (packedString) { - this._set(unpack(packedString)); - } - } - - Zone.prototype = { - _set: function (unpacked) { - this.name = unpacked.name; - this.abbrs = unpacked.abbrs; - this.untils = unpacked.untils; - this.offsets = unpacked.offsets; - this.population = unpacked.population; - }, - - _index: function (timestamp) { - var target = +timestamp, - untils = this.untils, - i; - - for (i = 0; i < untils.length; i++) { - if (target < untils[i]) { - return i; - } - } - }, - - countries: function () { - var zone_name = this.name; - return Object.keys(countries).filter(function (country_code) { - return countries[country_code].zones.indexOf(zone_name) !== -1; - }); - }, - - parse: function (timestamp) { - var target = +timestamp, - offsets = this.offsets, - untils = this.untils, - max = untils.length - 1, - offset, - offsetNext, - offsetPrev, - i; - - for (i = 0; i < max; i++) { - offset = offsets[i]; - offsetNext = offsets[i + 1]; - offsetPrev = offsets[i ? i - 1 : i]; - - if (offset < offsetNext && tz.moveAmbiguousForward) { - offset = offsetNext; - } else if (offset > offsetPrev && tz.moveInvalidForward) { - offset = offsetPrev; - } - - if (target < untils[i] - offset * 60000) { - return offsets[i]; - } - } - - return offsets[max]; - }, - - abbr: function (mom) { - return this.abbrs[this._index(mom)]; - }, - - offset: function (mom) { - logError("zone.offset has been deprecated in favor of zone.utcOffset"); - return this.offsets[this._index(mom)]; - }, - - utcOffset: function (mom) { - return this.offsets[this._index(mom)]; - }, - }; - - /************************************ - Country object - ************************************/ - - function Country(country_name, zone_names) { - this.name = country_name; - this.zones = zone_names; - } - - /************************************ - Current Timezone - ************************************/ - - function OffsetAt(at) { - var timeString = at.toTimeString(); - var abbr = timeString.match(/\([a-z ]+\)/i); - if (abbr && abbr[0]) { - // 17:56:31 GMT-0600 (CST) - // 17:56:31 GMT-0600 (Central Standard Time) - abbr = abbr[0].match(/[A-Z]/g); - abbr = abbr ? abbr.join("") : undefined; - } else { - // 17:56:31 CST - // 17:56:31 GMT+0800 (台北標準時間) - abbr = timeString.match(/[A-Z]{3,5}/g); - abbr = abbr ? abbr[0] : undefined; - } - - if (abbr === "GMT") { - abbr = undefined; - } - - this.at = +at; - this.abbr = abbr; - this.offset = at.getTimezoneOffset(); - } - - function ZoneScore(zone) { - this.zone = zone; - this.offsetScore = 0; - this.abbrScore = 0; - } - - ZoneScore.prototype.scoreOffsetAt = function (offsetAt) { - this.offsetScore += Math.abs( - this.zone.utcOffset(offsetAt.at) - offsetAt.offset - ); - if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, "") !== offsetAt.abbr) { - this.abbrScore++; - } - }; - - function findChange(low, high) { - var mid, diff; - - while ((diff = (((high.at - low.at) / 12e4) | 0) * 6e4)) { - mid = new OffsetAt(new Date(low.at + diff)); - if (mid.offset === low.offset) { - low = mid; - } else { - high = mid; - } - } - - return low; - } - - function userOffsets() { - var startYear = new Date().getFullYear() - 2, - last = new OffsetAt(new Date(startYear, 0, 1)), - offsets = [last], - change, - next, - i; - - for (i = 1; i < 48; i++) { - next = new OffsetAt(new Date(startYear, i, 1)); - if (next.offset !== last.offset) { - change = findChange(last, next); - offsets.push(change); - offsets.push(new OffsetAt(new Date(change.at + 6e4))); - } - last = next; - } - - for (i = 0; i < 4; i++) { - offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))); - offsets.push(new OffsetAt(new Date(startYear + i, 6, 1))); - } - - return offsets; - } - - function sortZoneScores(a, b) { - if (a.offsetScore !== b.offsetScore) { - return a.offsetScore - b.offsetScore; - } - if (a.abbrScore !== b.abbrScore) { - return a.abbrScore - b.abbrScore; - } - if (a.zone.population !== b.zone.population) { - return b.zone.population - a.zone.population; - } - return b.zone.name.localeCompare(a.zone.name); - } - - function addToGuesses(name, offsets) { - var i, offset; - arrayToInt(offsets); - for (i = 0; i < offsets.length; i++) { - offset = offsets[i]; - guesses[offset] = guesses[offset] || {}; - guesses[offset][name] = true; - } - } - - function guessesForUserOffsets(offsets) { - var offsetsLength = offsets.length, - filteredGuesses = {}, - out = [], - i, - j, - guessesOffset; - - for (i = 0; i < offsetsLength; i++) { - guessesOffset = guesses[offsets[i].offset] || {}; - for (j in guessesOffset) { - if (guessesOffset.hasOwnProperty(j)) { - filteredGuesses[j] = true; - } - } - } - - for (i in filteredGuesses) { - if (filteredGuesses.hasOwnProperty(i)) { - out.push(names[i]); - } - } - - return out; - } - - function rebuildGuess() { - // use Intl API when available and returning valid time zone - try { - var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone; - if (intlName && intlName.length > 3) { - var name = names[normalizeName(intlName)]; - if (name) { - return name; - } - logError( - "Moment Timezone found " + - intlName + - " from the Intl api, but did not have that data loaded." - ); - } - } catch (e) { - // Intl unavailable, fall back to manual guessing. - } - - var offsets = userOffsets(), - offsetsLength = offsets.length, - guesses = guessesForUserOffsets(offsets), - zoneScores = [], - zoneScore, - i, - j; - - for (i = 0; i < guesses.length; i++) { - zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength); - for (j = 0; j < offsetsLength; j++) { - zoneScore.scoreOffsetAt(offsets[j]); - } - zoneScores.push(zoneScore); - } - - zoneScores.sort(sortZoneScores); - - return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined; - } - - function guess(ignoreCache) { - if (!cachedGuess || ignoreCache) { - cachedGuess = rebuildGuess(); - } - return cachedGuess; - } - - /************************************ - Global Methods - ************************************/ - - function normalizeName(name) { - return (name || "").toLowerCase().replace(/\//g, "_"); - } - - function addZone(packed) { - var i, name, split, normalized; - - if (typeof packed === "string") { - packed = [packed]; - } - - for (i = 0; i < packed.length; i++) { - split = packed[i].split("|"); - name = split[0]; - normalized = normalizeName(name); - zones[normalized] = packed[i]; - names[normalized] = name; - addToGuesses(normalized, split[2].split(" ")); - } - } - - function getZone(name, caller) { - name = normalizeName(name); - - var zone = zones[name]; - var link; - - if (zone instanceof Zone) { - return zone; - } - - if (typeof zone === "string") { - zone = new Zone(zone); - zones[name] = zone; - return zone; - } - - // Pass getZone to prevent recursion more than 1 level deep - if ( - links[name] && - caller !== getZone && - (link = getZone(links[name], getZone)) - ) { - zone = zones[name] = new Zone(); - zone._set(link); - zone.name = names[name]; - return zone; - } - - return null; - } - - function getNames() { - var i, - out = []; - - for (i in names) { - if ( - names.hasOwnProperty(i) && - (zones[i] || zones[links[i]]) && - names[i] - ) { - out.push(names[i]); - } - } - - return out.sort(); - } - - function getCountryNames() { - return Object.keys(countries); - } - - function addLink(aliases) { - var i, alias, normal0, normal1; - - if (typeof aliases === "string") { - aliases = [aliases]; - } - - for (i = 0; i < aliases.length; i++) { - alias = aliases[i].split("|"); - - normal0 = normalizeName(alias[0]); - normal1 = normalizeName(alias[1]); - - links[normal0] = normal1; - names[normal0] = alias[0]; - - links[normal1] = normal0; - names[normal1] = alias[1]; - } - } - - function addCountries(data) { - var i, country_code, country_zones, split; - if (!data || !data.length) return; - for (i = 0; i < data.length; i++) { - split = data[i].split("|"); - country_code = split[0].toUpperCase(); - country_zones = split[1].split(" "); - countries[country_code] = new Country(country_code, country_zones); - } - } - - function getCountry(name) { - name = name.toUpperCase(); - return countries[name] || null; - } - - function zonesForCountry(country, with_offset) { - country = getCountry(country); - - if (!country) return null; - - var zones = country.zones.sort(); - - if (with_offset) { - return zones.map(function (zone_name) { - var zone = getZone(zone_name); - return { - name: zone_name, - offset: zone.utcOffset(new Date()), - }; - }); - } - - return zones; - } - - function loadData(data) { - addZone(data.zones); - addLink(data.links); - addCountries(data.countries); - tz.dataVersion = data.version; - } - - function zoneExists(name) { - if (!zoneExists.didShowError) { - zoneExists.didShowError = true; - logError( - "moment.tz.zoneExists('" + - name + - "') has been deprecated in favor of !moment.tz.zone('" + - name + - "')" - ); - } - return !!getZone(name); - } - - function needsOffset(m) { - var isUnixTimestamp = m._f === "X" || m._f === "x"; - return !!(m._a && m._tzm === undefined && !isUnixTimestamp); - } - - function logError(message) { - if (typeof console !== "undefined" && typeof console.error === "function") { - console.error(message); - } - } - - /************************************ - moment.tz namespace - ************************************/ - - function tz(input) { - var args = Array.prototype.slice.call(arguments, 0, -1), - name = arguments[arguments.length - 1], - zone = getZone(name), - out = moment.utc.apply(null, args); - - if (zone && !moment.isMoment(input) && needsOffset(out)) { - out.add(zone.parse(out), "minutes"); - } - - out.tz(name); - - return out; - } - - tz.version = VERSION; - tz.dataVersion = ""; - tz._zones = zones; - tz._links = links; - tz._names = names; - tz._countries = countries; - tz.add = addZone; - tz.link = addLink; - tz.load = loadData; - tz.zone = getZone; - tz.zoneExists = zoneExists; // deprecated in 0.1.0 - tz.guess = guess; - tz.names = getNames; - tz.Zone = Zone; - tz.unpack = unpack; - tz.unpackBase60 = unpackBase60; - tz.needsOffset = needsOffset; - tz.moveInvalidForward = true; - tz.moveAmbiguousForward = false; - tz.countries = getCountryNames; - tz.zonesForCountry = zonesForCountry; - - /************************************ - Interface with Moment.js - ************************************/ - - var fn = moment.fn; - - moment.tz = tz; - - moment.defaultZone = null; - - moment.updateOffset = function (mom, keepTime) { - var zone = moment.defaultZone, - offset; - - if (mom._z === undefined) { - if (zone && needsOffset(mom) && !mom._isUTC) { - mom._d = moment.utc(mom._a)._d; - mom.utc().add(zone.parse(mom), "minutes"); - } - mom._z = zone; - } - if (mom._z) { - offset = mom._z.utcOffset(mom); - if (Math.abs(offset) < 16) { - offset = offset / 60; - } - if (mom.utcOffset !== undefined) { - var z = mom._z; - mom.utcOffset(-offset, keepTime); - mom._z = z; - } else { - mom.zone(offset, keepTime); - } - } - }; - - fn.tz = function (name, keepTime) { - if (name) { - if (typeof name !== "string") { - throw new Error( - "Time zone name must be a string, got " + - name + - " [" + - typeof name + - "]" - ); - } - this._z = getZone(name); - if (this._z) { - moment.updateOffset(this, keepTime); - } else { - logError( - "Moment Timezone has no data for " + - name + - ". See http://momentjs.com/timezone/docs/#/data-loading/." - ); - } - return this; - } - if (this._z) { - return this._z.name; - } - }; - - function abbrWrap(old) { - return function () { - if (this._z) { - return this._z.abbr(this); - } - return old.call(this); - }; - } - - function resetZoneWrap(old) { - return function () { - this._z = null; - return old.apply(this, arguments); - }; - } - - function resetZoneWrap2(old) { - return function () { - if (arguments.length > 0) this._z = null; - return old.apply(this, arguments); - }; - } - - fn.zoneName = abbrWrap(fn.zoneName); - fn.zoneAbbr = abbrWrap(fn.zoneAbbr); - fn.utc = resetZoneWrap(fn.utc); - fn.local = resetZoneWrap(fn.local); - fn.utcOffset = resetZoneWrap2(fn.utcOffset); - - moment.tz.setDefault = function (name) { - if (major < 2 || (major === 2 && minor < 9)) { - logError( - "Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + - moment.version + - "." - ); - } - moment.defaultZone = name ? getZone(name) : null; - return moment; - }; - - // Cloning a moment should include the _z property. - var momentProperties = moment.momentProperties; - if (Object.prototype.toString.call(momentProperties) === "[object Array]") { - // moment 2.8.1+ - momentProperties.push("_z"); - momentProperties.push("_a"); - } else if (momentProperties) { - // moment 2.7.0 - momentProperties._z = null; - } - - loadData({ - version: "2022g", - zones: [ - "Africa/Abidjan|GMT|0|0||48e5", - "Africa/Nairobi|EAT|-30|0||47e5", - "Africa/Algiers|CET|-10|0||26e5", - "Africa/Lagos|WAT|-10|0||17e6", - "Africa/Maputo|CAT|-20|0||26e5", - "Africa/Cairo|EET|-20|0||15e6", - "Africa/Casablanca|+00 +01|0 -10|01010101010101010101010101|1T0q0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00|32e5", - "Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1T0p0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|11e6", - "Africa/Johannesburg|SAST|-20|0||84e5", - "Africa/Juba|EAT CAT|-30 -20|01|24nx0|", - "Africa/Khartoum|EAT CAT|-30 -20|01|1Usl0|51e5", - "Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00|", - "Africa/Windhoek|CAT WAT|-20 -10|010|1T3c0 11B0|32e4", - "America/Adak|HST HDT|a0 90|01010101010101010101010|1ST00 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|326", - "America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1SSX0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|30e4", - "America/Santo_Domingo|AST|40|0||29e5", - "America/Fortaleza|-03|30|0||34e5", - "America/Asuncion|-03 -04|30 40|01010101010101010101010|1T0r0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0|28e5", - "America/Panama|EST|50|0||15e5", - "America/Mexico_City|CST CDT|60 50|0101010101010|1T3k0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6", - "America/Managua|CST|60|0||22e5", - "America/Caracas|-04|40|0||29e5", - "America/Lima|-05|50|0||11e6", - "America/Denver|MST MDT|70 60|01010101010101010101010|1SSV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|26e5", - "America/Campo_Grande|-03 -04|30 40|010101|1SKr0 1zd0 On0 1HB0 FX0|77e4", - "America/Chicago|CST CDT|60 50|01010101010101010101010|1SSU0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|92e5", - "America/Chihuahua|MST MDT CST|70 60 60|0101010101012|1T3l0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4", - "America/Ciudad_Juarez|MST MDT CST|70 60 60|010101010101201010101010|1SSV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 cm0 EP0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|", - "America/Phoenix|MST|70|0||42e5", - "America/Whitehorse|PST PDT MST|80 70 70|010101012|1SSW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|23e3", - "America/New_York|EST EDT|50 40|01010101010101010101010|1SST0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|21e6", - "America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1SSW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|15e6", - "America/Halifax|AST ADT|40 30|01010101010101010101010|1SSS0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|39e4", - "America/Godthab|-03 -02|30 20|01010101010101|1T0p0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0|17e3", - "America/Grand_Turk|AST EDT EST|40 40 50|012121212121212121212|1Vkv0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|37e2", - "America/Havana|CST CDT|50 40|01010101010101010101010|1SSR0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0|21e5", - "America/Mazatlan|MST MDT|70 60|0101010101010|1T3l0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|44e4", - "America/Metlakatla|AKST AKDT PST|90 80 80|010120101010101010101010|1SSX0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|14e2", - "America/Miquelon|-03 -02|30 20|01010101010101010101010|1SSR0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|61e2", - "America/Noronha|-02|20|0||30e2", - "America/Ojinaga|MST MDT CST CDT|70 60 60 50|01010101010123232323232|1SSV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 Rc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|23e3", - "America/Santiago|-03 -04|30 40|01010101010101010101010|1Tk30 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|62e5", - "America/Sao_Paulo|-02 -03|20 30|010101|1SKq0 1zd0 On0 1HB0 FX0|20e6", - "Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1T0p0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|25e4", - "America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1SSRu 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0|11e4", - "Antarctica/Casey|+11 +08|-b0 -80|0101010|1Vkh0 1o30 14k0 1kr0 12l0 1o01|10", - "Asia/Bangkok|+07|-70|0||15e6", - "Asia/Vladivostok|+10|-a0|0||60e4", - "Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1T340 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|40e5", - "Asia/Tashkent|+05|-50|0||23e5", - "Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1T320 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|14e5", - "Europe/Istanbul|+03|-30|0||13e6", - "Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1T0p0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|40", - "Asia/Dhaka|+06|-60|0||16e6", - "Asia/Amman|EET EEST +03|-20 -30 -30|0101010101012|1T2m0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 LA0 1C00|25e5", - "Asia/Kamchatka|+12|-c0|0||18e4", - "Asia/Dubai|+04|-40|0||39e5", - "Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1T0m0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0|22e5", - "Asia/Kuala_Lumpur|+08|-80|0||71e5", - "Asia/Kolkata|IST|-5u|0||15e6", - "Asia/Chita|+09|-90|0||33e4", - "Asia/Shanghai|CST|-80|0||23e6", - "Asia/Colombo|+0530|-5u|0||22e5", - "Asia/Damascus|EET EEST +03|-20 -30 -30|0101010101012|1T2m0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5", - "Asia/Famagusta|+03 EET EEST|-30 -20 -30|0121212121212121212121|1Urd0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|", - "Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1SXX0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qo0 XA0 1qp0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0|18e5", - "Asia/Hong_Kong|HKT|-80|0||73e5", - "Asia/Jakarta|WIB|-70|0||31e6", - "Asia/Jayapura|WIT|-90|0||26e4", - "Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1SXA0 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0|81e4", - "Asia/Kabul|+0430|-4u|0||46e5", - "Asia/Karachi|PKT|-50|0||24e6", - "Asia/Kathmandu|+0545|-5J|0||12e5", - "Asia/Sakhalin|+11|-b0|0||58e4", - "Asia/Makassar|WITA|-80|0||15e5", - "Asia/Manila|PST|-80|0||24e6", - "Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1T0p0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|35e5", - "Asia/Pyongyang|KST KST|-8u -90|01|1VGf0|29e5", - "Asia/Qyzylorda|+06 +05|-60 -50|01|1Xei0|73e4", - "Asia/Rangoon|+0630|-6u|0||48e5", - "Asia/Seoul|KST|-90|0||23e6", - "Asia/Tehran|+0330 +0430|-3u -4u|0101010101010|1SWIu 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6", - "Asia/Tokyo|JST|-90|0||38e6", - "Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1T0p0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|27e5", - "Atlantic/Cape_Verde|-01|10|0||50e4", - "Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1T34u 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|11e5", - "Australia/Brisbane|AEST|-a0|0||20e5", - "Australia/Darwin|ACST|-9u|0||12e4", - "Australia/Eucla|+0845|-8J|0||368", - "Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1T330 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu|347", - "Australia/Perth|AWST|-80|0||18e5", - "Pacific/Easter|-05 -06|50 60|01010101010101010101010|1Tk30 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|30e2", - "Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1T0p0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|12e5", - "Etc/GMT-1|+01|-10|0||", - "Pacific/Fakaofo|+13|-d0|0||483", - "Pacific/Kiritimati|+14|-e0|0||51e2", - "Etc/GMT-2|+02|-20|0||", - "Pacific/Tahiti|-10|a0|0||18e4", - "Pacific/Niue|-11|b0|0||12e2", - "Etc/GMT+12|-12|c0|0||", - "Pacific/Galapagos|-06|60|0||25e3", - "Etc/GMT+7|-07|70|0||", - "Pacific/Pitcairn|-08|80|0||56", - "Pacific/Gambier|-09|90|0||125", - "Etc/UTC|UTC|0|0||", - "Europe/London|GMT BST|0 -10|01010101010101010101010|1T0p0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|10e6", - "Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1T0o0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|67e4", - "Europe/Moscow|MSK|-30|0||16e6", - "Europe/Volgograd|+03 +04|-30 -40|010|1WQL0 5gn0|10e5", - "Pacific/Honolulu|HST|a0|0||37e4", - "MET|MET MEST|-10 -20|01010101010101010101010|1T0p0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|", - "Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1T320 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|600", - "Pacific/Apia|+14 +13|-e0 -d0|0101010101|1T320 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0|37e3", - "Pacific/Fiji|+13 +12|-d0 -c0|0101010101|1Swe0 1VA0 s00 1VA0 s00 20o0 pc0 2hc0 bc0|88e4", - "Pacific/Guam|ChST|-a0|0||17e4", - "Pacific/Marquesas|-0930|9u|0||86e2", - "Pacific/Pago_Pago|SST|b0|0||37e2", - "Pacific/Norfolk|+11 +12|-b0 -c0|010101010101010101|219P0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|25e4", - "Pacific/Tongatapu|+14 +13|-e0 -d0|01|1Swd0|75e3", - ], - links: [ - "Africa/Abidjan|Africa/Accra", - "Africa/Abidjan|Africa/Bamako", - "Africa/Abidjan|Africa/Banjul", - "Africa/Abidjan|Africa/Bissau", - "Africa/Abidjan|Africa/Conakry", - "Africa/Abidjan|Africa/Dakar", - "Africa/Abidjan|Africa/Freetown", - "Africa/Abidjan|Africa/Lome", - "Africa/Abidjan|Africa/Monrovia", - "Africa/Abidjan|Africa/Nouakchott", - "Africa/Abidjan|Africa/Ouagadougou", - "Africa/Abidjan|Africa/Timbuktu", - "Africa/Abidjan|America/Danmarkshavn", - "Africa/Abidjan|Atlantic/Reykjavik", - "Africa/Abidjan|Atlantic/St_Helena", - "Africa/Abidjan|Etc/GMT", - "Africa/Abidjan|Etc/GMT+0", - "Africa/Abidjan|Etc/GMT-0", - "Africa/Abidjan|Etc/GMT0", - "Africa/Abidjan|Etc/Greenwich", - "Africa/Abidjan|GMT", - "Africa/Abidjan|GMT+0", - "Africa/Abidjan|GMT-0", - "Africa/Abidjan|GMT0", - "Africa/Abidjan|Greenwich", - "Africa/Abidjan|Iceland", - "Africa/Algiers|Africa/Tunis", - "Africa/Cairo|Africa/Tripoli", - "Africa/Cairo|Egypt", - "Africa/Cairo|Europe/Kaliningrad", - "Africa/Cairo|Libya", - "Africa/Casablanca|Africa/El_Aaiun", - "Africa/Johannesburg|Africa/Maseru", - "Africa/Johannesburg|Africa/Mbabane", - "Africa/Lagos|Africa/Bangui", - "Africa/Lagos|Africa/Brazzaville", - "Africa/Lagos|Africa/Douala", - "Africa/Lagos|Africa/Kinshasa", - "Africa/Lagos|Africa/Libreville", - "Africa/Lagos|Africa/Luanda", - "Africa/Lagos|Africa/Malabo", - "Africa/Lagos|Africa/Ndjamena", - "Africa/Lagos|Africa/Niamey", - "Africa/Lagos|Africa/Porto-Novo", - "Africa/Maputo|Africa/Blantyre", - "Africa/Maputo|Africa/Bujumbura", - "Africa/Maputo|Africa/Gaborone", - "Africa/Maputo|Africa/Harare", - "Africa/Maputo|Africa/Kigali", - "Africa/Maputo|Africa/Lubumbashi", - "Africa/Maputo|Africa/Lusaka", - "Africa/Nairobi|Africa/Addis_Ababa", - "Africa/Nairobi|Africa/Asmara", - "Africa/Nairobi|Africa/Asmera", - "Africa/Nairobi|Africa/Dar_es_Salaam", - "Africa/Nairobi|Africa/Djibouti", - "Africa/Nairobi|Africa/Kampala", - "Africa/Nairobi|Africa/Mogadishu", - "Africa/Nairobi|Indian/Antananarivo", - "Africa/Nairobi|Indian/Comoro", - "Africa/Nairobi|Indian/Mayotte", - "America/Adak|America/Atka", - "America/Adak|US/Aleutian", - "America/Anchorage|America/Juneau", - "America/Anchorage|America/Nome", - "America/Anchorage|America/Sitka", - "America/Anchorage|America/Yakutat", - "America/Anchorage|US/Alaska", - "America/Campo_Grande|America/Cuiaba", - "America/Caracas|America/Boa_Vista", - "America/Caracas|America/Guyana", - "America/Caracas|America/La_Paz", - "America/Caracas|America/Manaus", - "America/Caracas|America/Porto_Velho", - "America/Caracas|Brazil/West", - "America/Caracas|Etc/GMT+4", - "America/Chicago|America/Indiana/Knox", - "America/Chicago|America/Indiana/Tell_City", - "America/Chicago|America/Knox_IN", - "America/Chicago|America/Matamoros", - "America/Chicago|America/Menominee", - "America/Chicago|America/North_Dakota/Beulah", - "America/Chicago|America/North_Dakota/Center", - "America/Chicago|America/North_Dakota/New_Salem", - "America/Chicago|America/Rainy_River", - "America/Chicago|America/Rankin_Inlet", - "America/Chicago|America/Resolute", - "America/Chicago|America/Winnipeg", - "America/Chicago|CST6CDT", - "America/Chicago|Canada/Central", - "America/Chicago|US/Central", - "America/Chicago|US/Indiana-Starke", - "America/Denver|America/Boise", - "America/Denver|America/Cambridge_Bay", - "America/Denver|America/Edmonton", - "America/Denver|America/Inuvik", - "America/Denver|America/Shiprock", - "America/Denver|America/Yellowknife", - "America/Denver|Canada/Mountain", - "America/Denver|MST7MDT", - "America/Denver|Navajo", - "America/Denver|US/Mountain", - "America/Fortaleza|America/Araguaina", - "America/Fortaleza|America/Argentina/Buenos_Aires", - "America/Fortaleza|America/Argentina/Catamarca", - "America/Fortaleza|America/Argentina/ComodRivadavia", - "America/Fortaleza|America/Argentina/Cordoba", - "America/Fortaleza|America/Argentina/Jujuy", - "America/Fortaleza|America/Argentina/La_Rioja", - "America/Fortaleza|America/Argentina/Mendoza", - "America/Fortaleza|America/Argentina/Rio_Gallegos", - "America/Fortaleza|America/Argentina/Salta", - "America/Fortaleza|America/Argentina/San_Juan", - "America/Fortaleza|America/Argentina/San_Luis", - "America/Fortaleza|America/Argentina/Tucuman", - "America/Fortaleza|America/Argentina/Ushuaia", - "America/Fortaleza|America/Bahia", - "America/Fortaleza|America/Belem", - "America/Fortaleza|America/Buenos_Aires", - "America/Fortaleza|America/Catamarca", - "America/Fortaleza|America/Cayenne", - "America/Fortaleza|America/Cordoba", - "America/Fortaleza|America/Jujuy", - "America/Fortaleza|America/Maceio", - "America/Fortaleza|America/Mendoza", - "America/Fortaleza|America/Montevideo", - "America/Fortaleza|America/Paramaribo", - "America/Fortaleza|America/Punta_Arenas", - "America/Fortaleza|America/Recife", - "America/Fortaleza|America/Rosario", - "America/Fortaleza|America/Santarem", - "America/Fortaleza|Antarctica/Palmer", - "America/Fortaleza|Antarctica/Rothera", - "America/Fortaleza|Atlantic/Stanley", - "America/Fortaleza|Etc/GMT+3", - "America/Godthab|America/Nuuk", - "America/Halifax|America/Glace_Bay", - "America/Halifax|America/Goose_Bay", - "America/Halifax|America/Moncton", - "America/Halifax|America/Thule", - "America/Halifax|Atlantic/Bermuda", - "America/Halifax|Canada/Atlantic", - "America/Havana|Cuba", - "America/Lima|America/Bogota", - "America/Lima|America/Eirunepe", - "America/Lima|America/Guayaquil", - "America/Lima|America/Porto_Acre", - "America/Lima|America/Rio_Branco", - "America/Lima|Brazil/Acre", - "America/Lima|Etc/GMT+5", - "America/Los_Angeles|America/Ensenada", - "America/Los_Angeles|America/Santa_Isabel", - "America/Los_Angeles|America/Tijuana", - "America/Los_Angeles|America/Vancouver", - "America/Los_Angeles|Canada/Pacific", - "America/Los_Angeles|Mexico/BajaNorte", - "America/Los_Angeles|PST8PDT", - "America/Los_Angeles|US/Pacific", - "America/Managua|America/Belize", - "America/Managua|America/Costa_Rica", - "America/Managua|America/El_Salvador", - "America/Managua|America/Guatemala", - "America/Managua|America/Regina", - "America/Managua|America/Swift_Current", - "America/Managua|America/Tegucigalpa", - "America/Managua|Canada/Saskatchewan", - "America/Mazatlan|Mexico/BajaSur", - "America/Mexico_City|America/Bahia_Banderas", - "America/Mexico_City|America/Merida", - "America/Mexico_City|America/Monterrey", - "America/Mexico_City|Mexico/General", - "America/New_York|America/Detroit", - "America/New_York|America/Fort_Wayne", - "America/New_York|America/Indiana/Indianapolis", - "America/New_York|America/Indiana/Marengo", - "America/New_York|America/Indiana/Petersburg", - "America/New_York|America/Indiana/Vevay", - "America/New_York|America/Indiana/Vincennes", - "America/New_York|America/Indiana/Winamac", - "America/New_York|America/Indianapolis", - "America/New_York|America/Iqaluit", - "America/New_York|America/Kentucky/Louisville", - "America/New_York|America/Kentucky/Monticello", - "America/New_York|America/Louisville", - "America/New_York|America/Montreal", - "America/New_York|America/Nassau", - "America/New_York|America/Nipigon", - "America/New_York|America/Pangnirtung", - "America/New_York|America/Port-au-Prince", - "America/New_York|America/Thunder_Bay", - "America/New_York|America/Toronto", - "America/New_York|Canada/Eastern", - "America/New_York|EST5EDT", - "America/New_York|US/East-Indiana", - "America/New_York|US/Eastern", - "America/New_York|US/Michigan", - "America/Noronha|Atlantic/South_Georgia", - "America/Noronha|Brazil/DeNoronha", - "America/Noronha|Etc/GMT+2", - "America/Panama|America/Atikokan", - "America/Panama|America/Cancun", - "America/Panama|America/Cayman", - "America/Panama|America/Coral_Harbour", - "America/Panama|America/Jamaica", - "America/Panama|EST", - "America/Panama|Jamaica", - "America/Phoenix|America/Creston", - "America/Phoenix|America/Dawson_Creek", - "America/Phoenix|America/Fort_Nelson", - "America/Phoenix|America/Hermosillo", - "America/Phoenix|MST", - "America/Phoenix|US/Arizona", - "America/Santiago|Chile/Continental", - "America/Santo_Domingo|America/Anguilla", - "America/Santo_Domingo|America/Antigua", - "America/Santo_Domingo|America/Aruba", - "America/Santo_Domingo|America/Barbados", - "America/Santo_Domingo|America/Blanc-Sablon", - "America/Santo_Domingo|America/Curacao", - "America/Santo_Domingo|America/Dominica", - "America/Santo_Domingo|America/Grenada", - "America/Santo_Domingo|America/Guadeloupe", - "America/Santo_Domingo|America/Kralendijk", - "America/Santo_Domingo|America/Lower_Princes", - "America/Santo_Domingo|America/Marigot", - "America/Santo_Domingo|America/Martinique", - "America/Santo_Domingo|America/Montserrat", - "America/Santo_Domingo|America/Port_of_Spain", - "America/Santo_Domingo|America/Puerto_Rico", - "America/Santo_Domingo|America/St_Barthelemy", - "America/Santo_Domingo|America/St_Kitts", - "America/Santo_Domingo|America/St_Lucia", - "America/Santo_Domingo|America/St_Thomas", - "America/Santo_Domingo|America/St_Vincent", - "America/Santo_Domingo|America/Tortola", - "America/Santo_Domingo|America/Virgin", - "America/Sao_Paulo|Brazil/East", - "America/St_Johns|Canada/Newfoundland", - "America/Whitehorse|America/Dawson", - "America/Whitehorse|Canada/Yukon", - "Asia/Bangkok|Antarctica/Davis", - "Asia/Bangkok|Asia/Barnaul", - "Asia/Bangkok|Asia/Ho_Chi_Minh", - "Asia/Bangkok|Asia/Hovd", - "Asia/Bangkok|Asia/Krasnoyarsk", - "Asia/Bangkok|Asia/Novokuznetsk", - "Asia/Bangkok|Asia/Novosibirsk", - "Asia/Bangkok|Asia/Phnom_Penh", - "Asia/Bangkok|Asia/Saigon", - "Asia/Bangkok|Asia/Tomsk", - "Asia/Bangkok|Asia/Vientiane", - "Asia/Bangkok|Etc/GMT-7", - "Asia/Bangkok|Indian/Christmas", - "Asia/Chita|Asia/Dili", - "Asia/Chita|Asia/Khandyga", - "Asia/Chita|Asia/Yakutsk", - "Asia/Chita|Etc/GMT-9", - "Asia/Chita|Pacific/Palau", - "Asia/Dhaka|Antarctica/Vostok", - "Asia/Dhaka|Asia/Almaty", - "Asia/Dhaka|Asia/Bishkek", - "Asia/Dhaka|Asia/Dacca", - "Asia/Dhaka|Asia/Kashgar", - "Asia/Dhaka|Asia/Omsk", - "Asia/Dhaka|Asia/Qostanay", - "Asia/Dhaka|Asia/Thimbu", - "Asia/Dhaka|Asia/Thimphu", - "Asia/Dhaka|Asia/Urumqi", - "Asia/Dhaka|Etc/GMT-6", - "Asia/Dhaka|Indian/Chagos", - "Asia/Dubai|Asia/Baku", - "Asia/Dubai|Asia/Muscat", - "Asia/Dubai|Asia/Tbilisi", - "Asia/Dubai|Asia/Yerevan", - "Asia/Dubai|Etc/GMT-4", - "Asia/Dubai|Europe/Astrakhan", - "Asia/Dubai|Europe/Samara", - "Asia/Dubai|Europe/Saratov", - "Asia/Dubai|Europe/Ulyanovsk", - "Asia/Dubai|Indian/Mahe", - "Asia/Dubai|Indian/Mauritius", - "Asia/Dubai|Indian/Reunion", - "Asia/Gaza|Asia/Hebron", - "Asia/Hong_Kong|Hongkong", - "Asia/Jakarta|Asia/Pontianak", - "Asia/Jerusalem|Asia/Tel_Aviv", - "Asia/Jerusalem|Israel", - "Asia/Kamchatka|Asia/Anadyr", - "Asia/Kamchatka|Etc/GMT-12", - "Asia/Kamchatka|Kwajalein", - "Asia/Kamchatka|Pacific/Funafuti", - "Asia/Kamchatka|Pacific/Kwajalein", - "Asia/Kamchatka|Pacific/Majuro", - "Asia/Kamchatka|Pacific/Nauru", - "Asia/Kamchatka|Pacific/Tarawa", - "Asia/Kamchatka|Pacific/Wake", - "Asia/Kamchatka|Pacific/Wallis", - "Asia/Kathmandu|Asia/Katmandu", - "Asia/Kolkata|Asia/Calcutta", - "Asia/Kuala_Lumpur|Asia/Brunei", - "Asia/Kuala_Lumpur|Asia/Choibalsan", - "Asia/Kuala_Lumpur|Asia/Irkutsk", - "Asia/Kuala_Lumpur|Asia/Kuching", - "Asia/Kuala_Lumpur|Asia/Singapore", - "Asia/Kuala_Lumpur|Asia/Ulaanbaatar", - "Asia/Kuala_Lumpur|Asia/Ulan_Bator", - "Asia/Kuala_Lumpur|Etc/GMT-8", - "Asia/Kuala_Lumpur|Singapore", - "Asia/Makassar|Asia/Ujung_Pandang", - "Asia/Rangoon|Asia/Yangon", - "Asia/Rangoon|Indian/Cocos", - "Asia/Sakhalin|Asia/Magadan", - "Asia/Sakhalin|Asia/Srednekolymsk", - "Asia/Sakhalin|Etc/GMT-11", - "Asia/Sakhalin|Pacific/Bougainville", - "Asia/Sakhalin|Pacific/Efate", - "Asia/Sakhalin|Pacific/Guadalcanal", - "Asia/Sakhalin|Pacific/Kosrae", - "Asia/Sakhalin|Pacific/Noumea", - "Asia/Sakhalin|Pacific/Pohnpei", - "Asia/Sakhalin|Pacific/Ponape", - "Asia/Seoul|ROK", - "Asia/Shanghai|Asia/Chongqing", - "Asia/Shanghai|Asia/Chungking", - "Asia/Shanghai|Asia/Harbin", - "Asia/Shanghai|Asia/Macao", - "Asia/Shanghai|Asia/Macau", - "Asia/Shanghai|Asia/Taipei", - "Asia/Shanghai|PRC", - "Asia/Shanghai|ROC", - "Asia/Tashkent|Antarctica/Mawson", - "Asia/Tashkent|Asia/Aqtau", - "Asia/Tashkent|Asia/Aqtobe", - "Asia/Tashkent|Asia/Ashgabat", - "Asia/Tashkent|Asia/Ashkhabad", - "Asia/Tashkent|Asia/Atyrau", - "Asia/Tashkent|Asia/Dushanbe", - "Asia/Tashkent|Asia/Oral", - "Asia/Tashkent|Asia/Samarkand", - "Asia/Tashkent|Asia/Yekaterinburg", - "Asia/Tashkent|Etc/GMT-5", - "Asia/Tashkent|Indian/Kerguelen", - "Asia/Tashkent|Indian/Maldives", - "Asia/Tehran|Iran", - "Asia/Tokyo|Japan", - "Asia/Vladivostok|Antarctica/DumontDUrville", - "Asia/Vladivostok|Asia/Ust-Nera", - "Asia/Vladivostok|Etc/GMT-10", - "Asia/Vladivostok|Pacific/Chuuk", - "Asia/Vladivostok|Pacific/Port_Moresby", - "Asia/Vladivostok|Pacific/Truk", - "Asia/Vladivostok|Pacific/Yap", - "Atlantic/Azores|America/Scoresbysund", - "Atlantic/Cape_Verde|Etc/GMT+1", - "Australia/Adelaide|Australia/Broken_Hill", - "Australia/Adelaide|Australia/South", - "Australia/Adelaide|Australia/Yancowinna", - "Australia/Brisbane|Australia/Lindeman", - "Australia/Brisbane|Australia/Queensland", - "Australia/Darwin|Australia/North", - "Australia/Lord_Howe|Australia/LHI", - "Australia/Perth|Australia/West", - "Australia/Sydney|Antarctica/Macquarie", - "Australia/Sydney|Australia/ACT", - "Australia/Sydney|Australia/Canberra", - "Australia/Sydney|Australia/Currie", - "Australia/Sydney|Australia/Hobart", - "Australia/Sydney|Australia/Melbourne", - "Australia/Sydney|Australia/NSW", - "Australia/Sydney|Australia/Tasmania", - "Australia/Sydney|Australia/Victoria", - "Etc/UTC|Etc/UCT", - "Etc/UTC|Etc/Universal", - "Etc/UTC|Etc/Zulu", - "Etc/UTC|UCT", - "Etc/UTC|UTC", - "Etc/UTC|Universal", - "Etc/UTC|Zulu", - "Europe/Athens|Asia/Nicosia", - "Europe/Athens|EET", - "Europe/Athens|Europe/Bucharest", - "Europe/Athens|Europe/Helsinki", - "Europe/Athens|Europe/Kiev", - "Europe/Athens|Europe/Kyiv", - "Europe/Athens|Europe/Mariehamn", - "Europe/Athens|Europe/Nicosia", - "Europe/Athens|Europe/Riga", - "Europe/Athens|Europe/Sofia", - "Europe/Athens|Europe/Tallinn", - "Europe/Athens|Europe/Uzhgorod", - "Europe/Athens|Europe/Vilnius", - "Europe/Athens|Europe/Zaporozhye", - "Europe/Chisinau|Europe/Tiraspol", - "Europe/Dublin|Eire", - "Europe/Istanbul|Antarctica/Syowa", - "Europe/Istanbul|Asia/Aden", - "Europe/Istanbul|Asia/Baghdad", - "Europe/Istanbul|Asia/Bahrain", - "Europe/Istanbul|Asia/Istanbul", - "Europe/Istanbul|Asia/Kuwait", - "Europe/Istanbul|Asia/Qatar", - "Europe/Istanbul|Asia/Riyadh", - "Europe/Istanbul|Etc/GMT-3", - "Europe/Istanbul|Europe/Kirov", - "Europe/Istanbul|Europe/Minsk", - "Europe/Istanbul|Turkey", - "Europe/Lisbon|Atlantic/Canary", - "Europe/Lisbon|Atlantic/Faeroe", - "Europe/Lisbon|Atlantic/Faroe", - "Europe/Lisbon|Atlantic/Madeira", - "Europe/Lisbon|Portugal", - "Europe/Lisbon|WET", - "Europe/London|Europe/Belfast", - "Europe/London|Europe/Guernsey", - "Europe/London|Europe/Isle_of_Man", - "Europe/London|Europe/Jersey", - "Europe/London|GB", - "Europe/London|GB-Eire", - "Europe/Moscow|Europe/Simferopol", - "Europe/Moscow|W-SU", - "Europe/Paris|Africa/Ceuta", - "Europe/Paris|Arctic/Longyearbyen", - "Europe/Paris|Atlantic/Jan_Mayen", - "Europe/Paris|CET", - "Europe/Paris|Europe/Amsterdam", - "Europe/Paris|Europe/Andorra", - "Europe/Paris|Europe/Belgrade", - "Europe/Paris|Europe/Berlin", - "Europe/Paris|Europe/Bratislava", - "Europe/Paris|Europe/Brussels", - "Europe/Paris|Europe/Budapest", - "Europe/Paris|Europe/Busingen", - "Europe/Paris|Europe/Copenhagen", - "Europe/Paris|Europe/Gibraltar", - "Europe/Paris|Europe/Ljubljana", - "Europe/Paris|Europe/Luxembourg", - "Europe/Paris|Europe/Madrid", - "Europe/Paris|Europe/Malta", - "Europe/Paris|Europe/Monaco", - "Europe/Paris|Europe/Oslo", - "Europe/Paris|Europe/Podgorica", - "Europe/Paris|Europe/Prague", - "Europe/Paris|Europe/Rome", - "Europe/Paris|Europe/San_Marino", - "Europe/Paris|Europe/Sarajevo", - "Europe/Paris|Europe/Skopje", - "Europe/Paris|Europe/Stockholm", - "Europe/Paris|Europe/Tirane", - "Europe/Paris|Europe/Vaduz", - "Europe/Paris|Europe/Vatican", - "Europe/Paris|Europe/Vienna", - "Europe/Paris|Europe/Warsaw", - "Europe/Paris|Europe/Zagreb", - "Europe/Paris|Europe/Zurich", - "Europe/Paris|Poland", - "Pacific/Auckland|Antarctica/McMurdo", - "Pacific/Auckland|Antarctica/South_Pole", - "Pacific/Auckland|NZ", - "Pacific/Chatham|NZ-CHAT", - "Pacific/Easter|Chile/EasterIsland", - "Pacific/Fakaofo|Etc/GMT-13", - "Pacific/Fakaofo|Pacific/Enderbury", - "Pacific/Fakaofo|Pacific/Kanton", - "Pacific/Galapagos|Etc/GMT+6", - "Pacific/Gambier|Etc/GMT+9", - "Pacific/Guam|Pacific/Saipan", - "Pacific/Honolulu|HST", - "Pacific/Honolulu|Pacific/Johnston", - "Pacific/Honolulu|US/Hawaii", - "Pacific/Kiritimati|Etc/GMT-14", - "Pacific/Niue|Etc/GMT+11", - "Pacific/Pago_Pago|Pacific/Midway", - "Pacific/Pago_Pago|Pacific/Samoa", - "Pacific/Pago_Pago|US/Samoa", - "Pacific/Pitcairn|Etc/GMT+8", - "Pacific/Tahiti|Etc/GMT+10", - "Pacific/Tahiti|Pacific/Rarotonga", - ], - countries: [ - "AD|Europe/Andorra", - "AE|Asia/Dubai", - "AF|Asia/Kabul", - "AG|America/Puerto_Rico America/Antigua", - "AI|America/Puerto_Rico America/Anguilla", - "AL|Europe/Tirane", - "AM|Asia/Yerevan", - "AO|Africa/Lagos Africa/Luanda", - "AQ|Antarctica/Casey Antarctica/Davis Antarctica/Mawson Antarctica/Palmer Antarctica/Rothera Antarctica/Troll Asia/Urumqi Pacific/Auckland Pacific/Port_Moresby Asia/Riyadh Antarctica/McMurdo Antarctica/DumontDUrville Antarctica/Syowa Antarctica/Vostok", - "AR|America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Salta America/Argentina/Jujuy America/Argentina/Tucuman America/Argentina/Catamarca America/Argentina/La_Rioja America/Argentina/San_Juan America/Argentina/Mendoza America/Argentina/San_Luis America/Argentina/Rio_Gallegos America/Argentina/Ushuaia", - "AS|Pacific/Pago_Pago", - "AT|Europe/Vienna", - "AU|Australia/Lord_Howe Antarctica/Macquarie Australia/Hobart Australia/Melbourne Australia/Sydney Australia/Broken_Hill Australia/Brisbane Australia/Lindeman Australia/Adelaide Australia/Darwin Australia/Perth Australia/Eucla", - "AW|America/Puerto_Rico America/Aruba", - "AX|Europe/Helsinki Europe/Mariehamn", - "AZ|Asia/Baku", - "BA|Europe/Belgrade Europe/Sarajevo", - "BB|America/Barbados", - "BD|Asia/Dhaka", - "BE|Europe/Brussels", - "BF|Africa/Abidjan Africa/Ouagadougou", - "BG|Europe/Sofia", - "BH|Asia/Qatar Asia/Bahrain", - "BI|Africa/Maputo Africa/Bujumbura", - "BJ|Africa/Lagos Africa/Porto-Novo", - "BL|America/Puerto_Rico America/St_Barthelemy", - "BM|Atlantic/Bermuda", - "BN|Asia/Kuching Asia/Brunei", - "BO|America/La_Paz", - "BQ|America/Puerto_Rico America/Kralendijk", - "BR|America/Noronha America/Belem America/Fortaleza America/Recife America/Araguaina America/Maceio America/Bahia America/Sao_Paulo America/Campo_Grande America/Cuiaba America/Santarem America/Porto_Velho America/Boa_Vista America/Manaus America/Eirunepe America/Rio_Branco", - "BS|America/Toronto America/Nassau", - "BT|Asia/Thimphu", - "BW|Africa/Maputo Africa/Gaborone", - "BY|Europe/Minsk", - "BZ|America/Belize", - "CA|America/St_Johns America/Halifax America/Glace_Bay America/Moncton America/Goose_Bay America/Toronto America/Iqaluit America/Winnipeg America/Resolute America/Rankin_Inlet America/Regina America/Swift_Current America/Edmonton America/Cambridge_Bay America/Yellowknife America/Inuvik America/Dawson_Creek America/Fort_Nelson America/Whitehorse America/Dawson America/Vancouver America/Panama America/Puerto_Rico America/Phoenix America/Blanc-Sablon America/Atikokan America/Creston", - "CC|Asia/Yangon Indian/Cocos", - "CD|Africa/Maputo Africa/Lagos Africa/Kinshasa Africa/Lubumbashi", - "CF|Africa/Lagos Africa/Bangui", - "CG|Africa/Lagos Africa/Brazzaville", - "CH|Europe/Zurich", - "CI|Africa/Abidjan", - "CK|Pacific/Rarotonga", - "CL|America/Santiago America/Punta_Arenas Pacific/Easter", - "CM|Africa/Lagos Africa/Douala", - "CN|Asia/Shanghai Asia/Urumqi", - "CO|America/Bogota", - "CR|America/Costa_Rica", - "CU|America/Havana", - "CV|Atlantic/Cape_Verde", - "CW|America/Puerto_Rico America/Curacao", - "CX|Asia/Bangkok Indian/Christmas", - "CY|Asia/Nicosia Asia/Famagusta", - "CZ|Europe/Prague", - "DE|Europe/Zurich Europe/Berlin Europe/Busingen", - "DJ|Africa/Nairobi Africa/Djibouti", - "DK|Europe/Berlin Europe/Copenhagen", - "DM|America/Puerto_Rico America/Dominica", - "DO|America/Santo_Domingo", - "DZ|Africa/Algiers", - "EC|America/Guayaquil Pacific/Galapagos", - "EE|Europe/Tallinn", - "EG|Africa/Cairo", - "EH|Africa/El_Aaiun", - "ER|Africa/Nairobi Africa/Asmara", - "ES|Europe/Madrid Africa/Ceuta Atlantic/Canary", - "ET|Africa/Nairobi Africa/Addis_Ababa", - "FI|Europe/Helsinki", - "FJ|Pacific/Fiji", - "FK|Atlantic/Stanley", - "FM|Pacific/Kosrae Pacific/Port_Moresby Pacific/Guadalcanal Pacific/Chuuk Pacific/Pohnpei", - "FO|Atlantic/Faroe", - "FR|Europe/Paris", - "GA|Africa/Lagos Africa/Libreville", - "GB|Europe/London", - "GD|America/Puerto_Rico America/Grenada", - "GE|Asia/Tbilisi", - "GF|America/Cayenne", - "GG|Europe/London Europe/Guernsey", - "GH|Africa/Abidjan Africa/Accra", - "GI|Europe/Gibraltar", - "GL|America/Nuuk America/Danmarkshavn America/Scoresbysund America/Thule", - "GM|Africa/Abidjan Africa/Banjul", - "GN|Africa/Abidjan Africa/Conakry", - "GP|America/Puerto_Rico America/Guadeloupe", - "GQ|Africa/Lagos Africa/Malabo", - "GR|Europe/Athens", - "GS|Atlantic/South_Georgia", - "GT|America/Guatemala", - "GU|Pacific/Guam", - "GW|Africa/Bissau", - "GY|America/Guyana", - "HK|Asia/Hong_Kong", - "HN|America/Tegucigalpa", - "HR|Europe/Belgrade Europe/Zagreb", - "HT|America/Port-au-Prince", - "HU|Europe/Budapest", - "ID|Asia/Jakarta Asia/Pontianak Asia/Makassar Asia/Jayapura", - "IE|Europe/Dublin", - "IL|Asia/Jerusalem", - "IM|Europe/London Europe/Isle_of_Man", - "IN|Asia/Kolkata", - "IO|Indian/Chagos", - "IQ|Asia/Baghdad", - "IR|Asia/Tehran", - "IS|Africa/Abidjan Atlantic/Reykjavik", - "IT|Europe/Rome", - "JE|Europe/London Europe/Jersey", - "JM|America/Jamaica", - "JO|Asia/Amman", - "JP|Asia/Tokyo", - "KE|Africa/Nairobi", - "KG|Asia/Bishkek", - "KH|Asia/Bangkok Asia/Phnom_Penh", - "KI|Pacific/Tarawa Pacific/Kanton Pacific/Kiritimati", - "KM|Africa/Nairobi Indian/Comoro", - "KN|America/Puerto_Rico America/St_Kitts", - "KP|Asia/Pyongyang", - "KR|Asia/Seoul", - "KW|Asia/Riyadh Asia/Kuwait", - "KY|America/Panama America/Cayman", - "KZ|Asia/Almaty Asia/Qyzylorda Asia/Qostanay Asia/Aqtobe Asia/Aqtau Asia/Atyrau Asia/Oral", - "LA|Asia/Bangkok Asia/Vientiane", - "LB|Asia/Beirut", - "LC|America/Puerto_Rico America/St_Lucia", - "LI|Europe/Zurich Europe/Vaduz", - "LK|Asia/Colombo", - "LR|Africa/Monrovia", - "LS|Africa/Johannesburg Africa/Maseru", - "LT|Europe/Vilnius", - "LU|Europe/Brussels Europe/Luxembourg", - "LV|Europe/Riga", - "LY|Africa/Tripoli", - "MA|Africa/Casablanca", - "MC|Europe/Paris Europe/Monaco", - "MD|Europe/Chisinau", - "ME|Europe/Belgrade Europe/Podgorica", - "MF|America/Puerto_Rico America/Marigot", - "MG|Africa/Nairobi Indian/Antananarivo", - "MH|Pacific/Tarawa Pacific/Kwajalein Pacific/Majuro", - "MK|Europe/Belgrade Europe/Skopje", - "ML|Africa/Abidjan Africa/Bamako", - "MM|Asia/Yangon", - "MN|Asia/Ulaanbaatar Asia/Hovd Asia/Choibalsan", - "MO|Asia/Macau", - "MP|Pacific/Guam Pacific/Saipan", - "MQ|America/Martinique", - "MR|Africa/Abidjan Africa/Nouakchott", - "MS|America/Puerto_Rico America/Montserrat", - "MT|Europe/Malta", - "MU|Indian/Mauritius", - "MV|Indian/Maldives", - "MW|Africa/Maputo Africa/Blantyre", - "MX|America/Mexico_City America/Cancun America/Merida America/Monterrey America/Matamoros America/Chihuahua America/Ciudad_Juarez America/Ojinaga America/Mazatlan America/Bahia_Banderas America/Hermosillo America/Tijuana", - "MY|Asia/Kuching Asia/Singapore Asia/Kuala_Lumpur", - "MZ|Africa/Maputo", - "NA|Africa/Windhoek", - "NC|Pacific/Noumea", - "NE|Africa/Lagos Africa/Niamey", - "NF|Pacific/Norfolk", - "NG|Africa/Lagos", - "NI|America/Managua", - "NL|Europe/Brussels Europe/Amsterdam", - "NO|Europe/Berlin Europe/Oslo", - "NP|Asia/Kathmandu", - "NR|Pacific/Nauru", - "NU|Pacific/Niue", - "NZ|Pacific/Auckland Pacific/Chatham", - "OM|Asia/Dubai Asia/Muscat", - "PA|America/Panama", - "PE|America/Lima", - "PF|Pacific/Tahiti Pacific/Marquesas Pacific/Gambier", - "PG|Pacific/Port_Moresby Pacific/Bougainville", - "PH|Asia/Manila", - "PK|Asia/Karachi", - "PL|Europe/Warsaw", - "PM|America/Miquelon", - "PN|Pacific/Pitcairn", - "PR|America/Puerto_Rico", - "PS|Asia/Gaza Asia/Hebron", - "PT|Europe/Lisbon Atlantic/Madeira Atlantic/Azores", - "PW|Pacific/Palau", - "PY|America/Asuncion", - "QA|Asia/Qatar", - "RE|Asia/Dubai Indian/Reunion", - "RO|Europe/Bucharest", - "RS|Europe/Belgrade", - "RU|Europe/Kaliningrad Europe/Moscow Europe/Simferopol Europe/Kirov Europe/Volgograd Europe/Astrakhan Europe/Saratov Europe/Ulyanovsk Europe/Samara Asia/Yekaterinburg Asia/Omsk Asia/Novosibirsk Asia/Barnaul Asia/Tomsk Asia/Novokuznetsk Asia/Krasnoyarsk Asia/Irkutsk Asia/Chita Asia/Yakutsk Asia/Khandyga Asia/Vladivostok Asia/Ust-Nera Asia/Magadan Asia/Sakhalin Asia/Srednekolymsk Asia/Kamchatka Asia/Anadyr", - "RW|Africa/Maputo Africa/Kigali", - "SA|Asia/Riyadh", - "SB|Pacific/Guadalcanal", - "SC|Asia/Dubai Indian/Mahe", - "SD|Africa/Khartoum", - "SE|Europe/Berlin Europe/Stockholm", - "SG|Asia/Singapore", - "SH|Africa/Abidjan Atlantic/St_Helena", - "SI|Europe/Belgrade Europe/Ljubljana", - "SJ|Europe/Berlin Arctic/Longyearbyen", - "SK|Europe/Prague Europe/Bratislava", - "SL|Africa/Abidjan Africa/Freetown", - "SM|Europe/Rome Europe/San_Marino", - "SN|Africa/Abidjan Africa/Dakar", - "SO|Africa/Nairobi Africa/Mogadishu", - "SR|America/Paramaribo", - "SS|Africa/Juba", - "ST|Africa/Sao_Tome", - "SV|America/El_Salvador", - "SX|America/Puerto_Rico America/Lower_Princes", - "SY|Asia/Damascus", - "SZ|Africa/Johannesburg Africa/Mbabane", - "TC|America/Grand_Turk", - "TD|Africa/Ndjamena", - "TF|Asia/Dubai Indian/Maldives Indian/Kerguelen", - "TG|Africa/Abidjan Africa/Lome", - "TH|Asia/Bangkok", - "TJ|Asia/Dushanbe", - "TK|Pacific/Fakaofo", - "TL|Asia/Dili", - "TM|Asia/Ashgabat", - "TN|Africa/Tunis", - "TO|Pacific/Tongatapu", - "TR|Europe/Istanbul", - "TT|America/Puerto_Rico America/Port_of_Spain", - "TV|Pacific/Tarawa Pacific/Funafuti", - "TW|Asia/Taipei", - "TZ|Africa/Nairobi Africa/Dar_es_Salaam", - "UA|Europe/Simferopol Europe/Kyiv", - "UG|Africa/Nairobi Africa/Kampala", - "UM|Pacific/Pago_Pago Pacific/Tarawa Pacific/Honolulu Pacific/Midway Pacific/Wake", - "US|America/New_York America/Detroit America/Kentucky/Louisville America/Kentucky/Monticello America/Indiana/Indianapolis America/Indiana/Vincennes America/Indiana/Winamac America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Vevay America/Chicago America/Indiana/Tell_City America/Indiana/Knox America/Menominee America/North_Dakota/Center America/North_Dakota/New_Salem America/North_Dakota/Beulah America/Denver America/Boise America/Phoenix America/Los_Angeles America/Anchorage America/Juneau America/Sitka America/Metlakatla America/Yakutat America/Nome America/Adak Pacific/Honolulu", - "UY|America/Montevideo", - "UZ|Asia/Samarkand Asia/Tashkent", - "VA|Europe/Rome Europe/Vatican", - "VC|America/Puerto_Rico America/St_Vincent", - "VE|America/Caracas", - "VG|America/Puerto_Rico America/Tortola", - "VI|America/Puerto_Rico America/St_Thomas", - "VN|Asia/Bangkok Asia/Ho_Chi_Minh", - "VU|Pacific/Efate", - "WF|Pacific/Tarawa Pacific/Wallis", - "WS|Pacific/Apia", - "YE|Asia/Riyadh Asia/Aden", - "YT|Africa/Nairobi Indian/Mayotte", - "ZA|Africa/Johannesburg", - "ZM|Africa/Maputo Africa/Lusaka", - "ZW|Africa/Maputo Africa/Harare", - ], - }); - - return moment; -}); diff --git a/app/templates/assiduites/pages/ajout_justificatif.j2 b/app/templates/assiduites/pages/ajout_justificatif.j2 index c4885b3f8..0c102cb13 100644 --- a/app/templates/assiduites/pages/ajout_justificatif.j2 +++ b/app/templates/assiduites/pages/ajout_justificatif.j2 @@ -18,12 +18,12 @@
Date de début - + Journée(s) entière(s)
Date de fin - +
@@ -118,8 +118,8 @@ return false; } - const date_debut = moment.tz(deb, TIMEZONE); - const date_fin = moment.tz(fin, TIMEZONE); + const date_debut = new Date(deb); + const date_fin = new Date(fin); if (date_fin.isBefore(date_debut)) { openAlertModal("Erreur détéctée", document.createTextNode("La date de fin doit se trouver après la date de début."), "", color = "crimson"); @@ -138,8 +138,8 @@ const raison = field.querySelector('#justi_raison').value; return { - date_debut: moment.tz(deb, TIMEZONE).format(), - date_fin: moment.tz(fin, TIMEZONE).format(), + date_debut: new Date(deb).toIsoUtcString(), + date_fin: new Date(fin).toIsoUtcString(), etat: etat, raison: raison, } diff --git a/app/templates/assiduites/pages/bilan_etud.j2 b/app/templates/assiduites/pages/bilan_etud.j2 index dad94d274..304adf221 100644 --- a/app/templates/assiduites/pages/bilan_etud.j2 +++ b/app/templates/assiduites/pages/bilan_etud.j2 @@ -93,16 +93,15 @@ return; } - const date_debut = new moment.tz(dd_val + "T00:00", TIMEZONE); - const date_fin = new moment.tz(df_val + "T23:59", TIMEZONE); + const date_debut = new Date(dd_val + "T00:00"); + const date_fin = new Date(df_val + "T23:59"); if (date_debut.valueOf() > date_fin.valueOf()) { openAlertModal("Dates invalides", document.createTextNode('La date de début se situe après la date de fin.')); return; } - - countAssiduites(date_debut.format(), date_fin.format()) + countAssiduites(date_debut.toIsoUtcString(), date_fin.toIsoUtcString()) } diff --git a/app/templates/assiduites/pages/calendrier.j2 b/app/templates/assiduites/pages/calendrier.j2 index d976f2cad..a6b270d9d 100644 --- a/app/templates/assiduites/pages/calendrier.j2 +++ b/app/templates/assiduites/pages/calendrier.j2 @@ -111,10 +111,11 @@ + + + +
+ + +
+ + + \ No newline at end of file diff --git a/app/templates/assiduites/widgets/conflict.j2 b/app/templates/assiduites/widgets/conflict.j2 index c3ed9e878..57a74da3d 100644 --- a/app/templates/assiduites/widgets/conflict.j2 +++ b/app/templates/assiduites/widgets/conflict.j2 @@ -5,8 +5,8 @@ * @returns {String} un déplacement par rapport à la gauche en % */ function getLeftPosition(start) { - const startTime = new moment.tz(start, TIMEZONE); - const startMins = (startTime.hours() - 8) * 60 + startTime.minutes(); + const startTime = new Date(start); + const startMins = (startTime.getHours() - 8) * 60 + startTime.getMinutes(); return (startMins / (18 * 60 - 8 * 60)) * 100 + "%"; } /** @@ -21,8 +21,8 @@ return a.start < b.end && a.end > b.start; }; - const startTime = new moment.tz(start, TIMEZONE); - const endTime = new moment.tz(end, TIMEZONE); + const startTime = new Date(start); + const endTime = new Date(end); const assiduiteDuration = { start: startTime, end: endTime }; let position = 0; @@ -31,8 +31,8 @@ while (hasOverlap) { hasOverlap = false; Array.from(container.children).some((el) => { - const elStart = new moment.tz(el.getAttribute("data-start")); - const elEnd = new moment.tz(el.getAttribute("data-end")); + const elStart = new Date(el.getAttribute("data-start")); + const elEnd = new Date(el.getAttribute("data-end")); const elDuration = { start: elStart, end: elEnd }; if (overlaps(assiduiteDuration, elDuration)) { @@ -71,8 +71,8 @@ * @returns {String} la taille en % */ function getWidth(start, end) { - const startTime = new moment.tz(start, TIMEZONE); - const endTime = new moment.tz(end, TIMEZONE); + const startTime = new Date(start); + const endTime = new Date(end); const duration = (endTime - startTime) / 1000 / 60; @@ -259,10 +259,10 @@ const separatorTime = document.getElementById("promptTime").value; const dateString = document.querySelector("#tl_date").value + `T${separatorTime}`; - const separtorDate = new moment.tz(dateString, TIMEZONE); + const separtorDate = new Date(dateString); - const assiduite_debut = new moment.tz(this.selectedAssiduite.date_debut, TIMEZONE); - const assiduite_fin = new moment.tz(this.selectedAssiduite.date_fin, TIMEZONE); + const assiduite_debut = new Date(this.selectedAssiduite.date_debut); + const assiduite_fin = new Date(this.selectedAssiduite.date_fin); if ( separtorDate.isAfter(assiduite_debut) && @@ -270,14 +270,14 @@ ) { const assiduite_avant = { etat: this.selectedAssiduite.etat, - date_debut: assiduite_debut.format(), - date_fin: separtorDate.format(), + date_debut: assiduite_debut.toIsoUtcString()(), + date_fin: separtorDate.toIsoUtcString()(), }; const assiduite_apres = { etat: this.selectedAssiduite.etat, - date_debut: separtorDate.format(), - date_fin: assiduite_fin.format(), + date_debut: separtorDate.toIsoUtcString()(), + date_fin: assiduite_fin.toIsoUtcString()(), }; if (this.selectedAssiduite.moduleimpl_id) { @@ -396,8 +396,8 @@ //Placement des assiduités sur la timeline this.list.forEach((assiduite) => { const period = { - deb: new moment.tz(assiduite.date_debut, TIMEZONE), - fin: new moment.tz(assiduite.date_fin, TIMEZONE), + deb: new Date(assiduite.date_debut), + fin: new Date(assiduite.date_fin), }; if (!hasTimeConflict(period, this.interval)) { return; diff --git a/app/templates/assiduites/widgets/differee.j2 b/app/templates/assiduites/widgets/differee.j2 index 510585feb..510eb1af2 100644 --- a/app/templates/assiduites/widgets/differee.j2 +++ b/app/templates/assiduites/widgets/differee.j2 @@ -274,17 +274,21 @@