From 5574ef92c65300cce28548bd2780eb6d5df8536d Mon Sep 17 00:00:00 2001
From: build-token <build-token>
Date: Wed, 15 Jan 2025 13:45:40 +0000
Subject: [PATCH] publish: Merge branch 'update-tests' into 'dev'

generated from commit d56e78a9879acd6a7e2e2dbbef0ee01a84ce2b0e
---
 ...6195.js => ecolyo.22237e65a0b0c29a7c02.js} | 24 +++++++------------
 index.html                                    |  2 +-
 services/aggregatorUsageEvents/ecolyo.js      | 24 +++++++------------
 services/consumptionAlert/ecolyo.js           | 24 +++++++------------
 .../enedisHalfHourMonthlyAnalysis/ecolyo.js   | 24 +++++++------------
 services/monthlyReportNotification/ecolyo.js  | 24 +++++++------------
 6 files changed, 41 insertions(+), 81 deletions(-)
 rename app/{ecolyo.50bcfb4eaada554a6195.js => ecolyo.22237e65a0b0c29a7c02.js} (99%)

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 f8821a3d8..f7a73efbd 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 f024127b7..ad2eefb77 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 0bc66a57f..555a28fc3 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 2e5d3f2fe..9d0492ade 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 1b0fab98b..60ddc618a 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 3d58b79c9..628b5c2d7 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;
 }
-- 
GitLab