v0.11: getAll() fix for 28days february month!

This commit is contained in:
KiboOst
2018-03-03 11:16:20 +01:00
committed by GitHub
parent 7d7a18abb5
commit ce46e39d2e

View File

@@ -8,7 +8,7 @@
class Linky{ class Linky{
public $_version = '0.1'; public $_version = '0.11';
public function getData_perhour($date) public function getData_perhour($date)
{ {
@@ -147,7 +147,7 @@ class Linky{
//____Get per day //____Get per day
$var = clone $today; $var = clone $today;
$fromMonth = $var->sub(new DateInterval('P1M')); $fromMonth = $var->sub(new DateInterval('P30D'));
$fromMonth = $fromMonth->format('d/m/Y'); $fromMonth = $fromMonth->format('d/m/Y');
$this->getData_perday($fromMonth, $yesterday); $this->getData_perday($fromMonth, $yesterday);