diff --git a/app/ecolyo.50bcfb4eaada554a6195.js b/app/ecolyo.22237e65a0b0c29a7c02.js similarity index 99% rename from app/ecolyo.50bcfb4eaada554a6195.js rename to app/ecolyo.22237e65a0b0c29a7c02.js index f8821a3d8f07475d0c3a5118bfbb01903b66d0b0..f7a73efbda6a69f09dbb45c9962b2af9059edb9b 100644 --- a/app/ecolyo.50bcfb4eaada554a6195.js +++ b/app/ecolyo.22237e65a0b0c29a7c02.js @@ -1058,7 +1058,6 @@ if(false) {} Object.defineProperty(exports, "__esModule", { value: true }); -exports.SUMMER_WEEK_DATES = void 0; exports.compareDates = compareDates; exports.getActualAnalysisDate = exports.formatDate = exports.convertDateToShortDateString = exports.convertDateToMonthYearString = void 0; exports.getCurrentSeason = getCurrentSeason; @@ -1068,17 +1067,6 @@ exports.isLastPeriodReached = exports.isLastDateReached = void 0; var _enums = __webpack_require__("j0hM"); var _luxon = __webpack_require__("1EDv"); var _utils = __webpack_require__("RgLR"); -/** Between 21st of June and 20th of September */ -var SUMMER_WEEK_DATES = exports.SUMMER_WEEK_DATES = { - start: 25, - end: 38 -}; - -/** Between 31st of October and 30th of March */ -var WINTER_WEEK_DATES = { - start: 44, - end: 13 -}; function compareDates(dateA, dateB) { return dateA < dateB ? -1 : 1; } @@ -1209,11 +1197,15 @@ var getActualAnalysisDate = exports.getActualAnalysisDate = function getActualAn * - Otherwise returns null. */ function getCurrentSeason() { - var weekNumber = _luxon.DateTime.local().weekNumber; - if (weekNumber >= SUMMER_WEEK_DATES.start && weekNumber <= SUMMER_WEEK_DATES.end) { - return _enums.Season.SUMMER; - } else if (weekNumber >= WINTER_WEEK_DATES.start || weekNumber <= WINTER_WEEK_DATES.end) { + var now = _luxon.DateTime.local().setZone('utc', { + keepLocalTime: true + }); + var month = now.month; + var day = now.day; + if (month >= 10 && day >= 31 || month <= 3 && day <= 31) { return _enums.Season.WINTER; + } else if (month === 6 && day >= 21 || month >= 7 && month <= 8 || month === 9 && day <= 20) { + return _enums.Season.SUMMER; } return null; } diff --git a/index.html b/index.html index f024127b715f3cc3c4c61d85927a609a71072650..ad2eefb777cb461fe8ecb15107ef2bea29922a93 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212"><meta name="color-scheme" content="only dark">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.d9d0a97c74639946de38.js"></script><script src="app/ecolyo.50bcfb4eaada554a6195.js"></script></div></body></html> \ No newline at end of file +<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212"><meta name="color-scheme" content="only dark">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.d9d0a97c74639946de38.js"></script><script src="app/ecolyo.22237e65a0b0c29a7c02.js"></script></div></body></html> \ No newline at end of file diff --git a/services/aggregatorUsageEvents/ecolyo.js b/services/aggregatorUsageEvents/ecolyo.js index 0bc66a57f70cb046356d1eabc983170cd404a79a..555a28fc3f3d083966c52b8e7a700df0e1c51e9d 100644 --- a/services/aggregatorUsageEvents/ecolyo.js +++ b/services/aggregatorUsageEvents/ecolyo.js @@ -133804,7 +133804,6 @@ module.exports = JSON.parse("{\"fluidConfig\":[{\"fluidTypeId\":0,\"name\":\"ene Object.defineProperty(exports, "__esModule", { value: true }); -exports.SUMMER_WEEK_DATES = void 0; exports.compareDates = compareDates; exports.getActualAnalysisDate = exports.formatDate = exports.convertDateToShortDateString = exports.convertDateToMonthYearString = void 0; exports.getCurrentSeason = getCurrentSeason; @@ -133814,17 +133813,6 @@ exports.isLastPeriodReached = exports.isLastDateReached = void 0; var _enums = __webpack_require__(230); var _luxon = __webpack_require__(250); var _utils = __webpack_require__(913); -/** Between 21st of June and 20th of September */ -const SUMMER_WEEK_DATES = exports.SUMMER_WEEK_DATES = { - start: 25, - end: 38 -}; - -/** Between 31st of October and 30th of March */ -const WINTER_WEEK_DATES = { - start: 44, - end: 13 -}; function compareDates(dateA, dateB) { return dateA < dateB ? -1 : 1; } @@ -133961,11 +133949,15 @@ const getActualAnalysisDate = () => { */ exports.getActualAnalysisDate = getActualAnalysisDate; function getCurrentSeason() { - const weekNumber = _luxon.DateTime.local().weekNumber; - if (weekNumber >= SUMMER_WEEK_DATES.start && weekNumber <= SUMMER_WEEK_DATES.end) { - return _enums.Season.SUMMER; - } else if (weekNumber >= WINTER_WEEK_DATES.start || weekNumber <= WINTER_WEEK_DATES.end) { + const now = _luxon.DateTime.local().setZone('utc', { + keepLocalTime: true + }); + const month = now.month; + const day = now.day; + if (month >= 10 && day >= 31 || month <= 3 && day <= 31) { return _enums.Season.WINTER; + } else if (month === 6 && day >= 21 || month >= 7 && month <= 8 || month === 9 && day <= 20) { + return _enums.Season.SUMMER; } return null; } diff --git a/services/consumptionAlert/ecolyo.js b/services/consumptionAlert/ecolyo.js index 2e5d3f2fe28db7dcfa70c656b1fb57c8d4fc9ab8..9d0492ade2be1c622f80bd033872b44cd0db1565 100644 --- a/services/consumptionAlert/ecolyo.js +++ b/services/consumptionAlert/ecolyo.js @@ -116194,7 +116194,6 @@ module.exports = JSON.parse("{\"fluidConfig\":[{\"fluidTypeId\":0,\"name\":\"ene Object.defineProperty(exports, "__esModule", { value: true }); -exports.SUMMER_WEEK_DATES = void 0; exports.compareDates = compareDates; exports.getActualAnalysisDate = exports.formatDate = exports.convertDateToShortDateString = exports.convertDateToMonthYearString = void 0; exports.getCurrentSeason = getCurrentSeason; @@ -116204,17 +116203,6 @@ exports.isLastPeriodReached = exports.isLastDateReached = void 0; var _enums = __webpack_require__(230); var _luxon = __webpack_require__(250); var _utils = __webpack_require__(913); -/** Between 21st of June and 20th of September */ -const SUMMER_WEEK_DATES = exports.SUMMER_WEEK_DATES = { - start: 25, - end: 38 -}; - -/** Between 31st of October and 30th of March */ -const WINTER_WEEK_DATES = { - start: 44, - end: 13 -}; function compareDates(dateA, dateB) { return dateA < dateB ? -1 : 1; } @@ -116351,11 +116339,15 @@ const getActualAnalysisDate = () => { */ exports.getActualAnalysisDate = getActualAnalysisDate; function getCurrentSeason() { - const weekNumber = _luxon.DateTime.local().weekNumber; - if (weekNumber >= SUMMER_WEEK_DATES.start && weekNumber <= SUMMER_WEEK_DATES.end) { - return _enums.Season.SUMMER; - } else if (weekNumber >= WINTER_WEEK_DATES.start || weekNumber <= WINTER_WEEK_DATES.end) { + const now = _luxon.DateTime.local().setZone('utc', { + keepLocalTime: true + }); + const month = now.month; + const day = now.day; + if (month >= 10 && day >= 31 || month <= 3 && day <= 31) { return _enums.Season.WINTER; + } else if (month === 6 && day >= 21 || month >= 7 && month <= 8 || month === 9 && day <= 20) { + return _enums.Season.SUMMER; } return null; } diff --git a/services/enedisHalfHourMonthlyAnalysis/ecolyo.js b/services/enedisHalfHourMonthlyAnalysis/ecolyo.js index 1b0fab98b3b58310969dd545dd92f16d52cc4a55..60ddc618a428e6564624ba3a9ee63db4f8de14b9 100644 --- a/services/enedisHalfHourMonthlyAnalysis/ecolyo.js +++ b/services/enedisHalfHourMonthlyAnalysis/ecolyo.js @@ -133401,7 +133401,6 @@ module.exports = JSON.parse("{\"fluidConfig\":[{\"fluidTypeId\":0,\"name\":\"ene Object.defineProperty(exports, "__esModule", { value: true }); -exports.SUMMER_WEEK_DATES = void 0; exports.compareDates = compareDates; exports.getActualAnalysisDate = exports.formatDate = exports.convertDateToShortDateString = exports.convertDateToMonthYearString = void 0; exports.getCurrentSeason = getCurrentSeason; @@ -133411,17 +133410,6 @@ exports.isLastPeriodReached = exports.isLastDateReached = void 0; var _enums = __webpack_require__(230); var _luxon = __webpack_require__(250); var _utils = __webpack_require__(913); -/** Between 21st of June and 20th of September */ -const SUMMER_WEEK_DATES = exports.SUMMER_WEEK_DATES = { - start: 25, - end: 38 -}; - -/** Between 31st of October and 30th of March */ -const WINTER_WEEK_DATES = { - start: 44, - end: 13 -}; function compareDates(dateA, dateB) { return dateA < dateB ? -1 : 1; } @@ -133558,11 +133546,15 @@ const getActualAnalysisDate = () => { */ exports.getActualAnalysisDate = getActualAnalysisDate; function getCurrentSeason() { - const weekNumber = _luxon.DateTime.local().weekNumber; - if (weekNumber >= SUMMER_WEEK_DATES.start && weekNumber <= SUMMER_WEEK_DATES.end) { - return _enums.Season.SUMMER; - } else if (weekNumber >= WINTER_WEEK_DATES.start || weekNumber <= WINTER_WEEK_DATES.end) { + const now = _luxon.DateTime.local().setZone('utc', { + keepLocalTime: true + }); + const month = now.month; + const day = now.day; + if (month >= 10 && day >= 31 || month <= 3 && day <= 31) { return _enums.Season.WINTER; + } else if (month === 6 && day >= 21 || month >= 7 && month <= 8 || month === 9 && day <= 20) { + return _enums.Season.SUMMER; } return null; } diff --git a/services/monthlyReportNotification/ecolyo.js b/services/monthlyReportNotification/ecolyo.js index 3d58b79c99727f43a3791186d714c4e7888e9e4f..628b5c2d7db4cf9dfc0eb3a0e79ff1d7675b059a 100644 --- a/services/monthlyReportNotification/ecolyo.js +++ b/services/monthlyReportNotification/ecolyo.js @@ -116194,7 +116194,6 @@ module.exports = JSON.parse("{\"fluidConfig\":[{\"fluidTypeId\":0,\"name\":\"ene Object.defineProperty(exports, "__esModule", { value: true }); -exports.SUMMER_WEEK_DATES = void 0; exports.compareDates = compareDates; exports.getActualAnalysisDate = exports.formatDate = exports.convertDateToShortDateString = exports.convertDateToMonthYearString = void 0; exports.getCurrentSeason = getCurrentSeason; @@ -116204,17 +116203,6 @@ exports.isLastPeriodReached = exports.isLastDateReached = void 0; var _enums = __webpack_require__(230); var _luxon = __webpack_require__(250); var _utils = __webpack_require__(913); -/** Between 21st of June and 20th of September */ -const SUMMER_WEEK_DATES = exports.SUMMER_WEEK_DATES = { - start: 25, - end: 38 -}; - -/** Between 31st of October and 30th of March */ -const WINTER_WEEK_DATES = { - start: 44, - end: 13 -}; function compareDates(dateA, dateB) { return dateA < dateB ? -1 : 1; } @@ -116351,11 +116339,15 @@ const getActualAnalysisDate = () => { */ exports.getActualAnalysisDate = getActualAnalysisDate; function getCurrentSeason() { - const weekNumber = _luxon.DateTime.local().weekNumber; - if (weekNumber >= SUMMER_WEEK_DATES.start && weekNumber <= SUMMER_WEEK_DATES.end) { - return _enums.Season.SUMMER; - } else if (weekNumber >= WINTER_WEEK_DATES.start || weekNumber <= WINTER_WEEK_DATES.end) { + const now = _luxon.DateTime.local().setZone('utc', { + keepLocalTime: true + }); + const month = now.month; + const day = now.day; + if (month >= 10 && day >= 31 || month <= 3 && day <= 31) { return _enums.Season.WINTER; + } else if (month === 6 && day >= 21 || month >= 7 && month <= 8 || month === 9 && day <= 20) { + return _enums.Season.SUMMER; } return null; }