From cef30a9c9851aea636bc566769ca891ffcfc5d01 Mon Sep 17 00:00:00 2001 From: Aart van Halteren Date: Thu, 15 Sep 2022 21:45:57 +0200 Subject: [PATCH] Adjacent time intervals --- app/models/cost.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/cost.rb b/app/models/cost.rb index ce5df05..97c1c0b 100644 --- a/app/models/cost.rb +++ b/app/models/cost.rb @@ -133,22 +133,22 @@ class Cost case date.to_time.to_i # Date.parse("2019-12-08").to_time.to_i # From 8 Dec 2019 until 7 Dec 2020 - when 1575759600..1607295600 + when 1575763200..1607385599 #normaal_kwh * (0.07865 + 0.11822 + 0.03303) + dal_kwh * (0.06215 + 0.11822 + 0.03303) normaal_kwh_cost = 0.07865 dal_kwh_cost = 0.06215 # From 8 Dec 2020 until 7 Dec 2021 - when 1607382000..1638831600 + when 1607385600..1638921599 #normaal_kwh * (0.06782 + 0.11408 + 0.03630) + dal_kwh * (0.05259 + 0.11408 + 0.03630) normaal_kwh_cost = 0.06782 dal_kwh_cost = 0.05259 # From 8 Dec 2021 until 7 Sept 2022 - when 1638918000..1662501600 + when 1638921600..1662595199 # normaal_kwh * (0.23665 + 0.04452 + 0.03691) + dal_kwh * (0.19408 + 0.04452 + 0.03691) normaal_kwh_cost = 0.23665 dal_kwh_cost = 0.19408 # From 8 Sept 2022 until 7 Dec 2022 - when 1662588000..1670367600 + when 1662595200..1670457599 normaal_kwh_cost = 0.60824 dal_kwh_cost = 0.43701 end