From ce46e39d2e5f9a3199534d1e92406071e97099ac Mon Sep 17 00:00:00 2001 From: KiboOst Date: Sat, 3 Mar 2018 11:16:20 +0100 Subject: [PATCH] v0.11: getAll() fix for 28days february month! --- phpLinkyAPI.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpLinkyAPI.php b/phpLinkyAPI.php index a353399..2282d8c 100644 --- a/phpLinkyAPI.php +++ b/phpLinkyAPI.php @@ -8,7 +8,7 @@ class Linky{ - public $_version = '0.1'; + public $_version = '0.11'; public function getData_perhour($date) { @@ -147,7 +147,7 @@ class Linky{ //____Get per day $var = clone $today; - $fromMonth = $var->sub(new DateInterval('P1M')); + $fromMonth = $var->sub(new DateInterval('P30D')); $fromMonth = $fromMonth->format('d/m/Y'); $this->getData_perday($fromMonth, $yesterday); @@ -325,4 +325,4 @@ class Linky{ //Linky end } -?> \ No newline at end of file +?>