@@ -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 ; | |||
} | |||
} |