Browse Source

Correctif DateComponent

develop
Guillaume 3 years ago
parent
commit
25b7949a4a
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      Component/DateComponent.php

+ 14
- 0
Component/DateComponent.php View File

@@ -52,4 +52,18 @@ class DateComponent
return '';
}

// getDeliverySlotHour
public function getHour(\DateTime $date)
{
$timestamp = $date->getTimestamp() ;
$hour = $this->date('%kh', $timestamp) ;
$minutes = $this->date('%M', $timestamp) ;

if($minutes != '00') {
$hour .= $minutes ;
}

return $hour ;
}

}

Loading…
Cancel
Save