How do you I create a Carbon date if I have the date part in the following format 'd M Y' and I have hours and minutes in separate variables as integers.
$this->start_dt = '06 Feb 2016' $this->start_hr = '12' $this->start_min = '00'
Currently I'm having to do this but it also ends up adding the current seconds.
Carbon::createFromFormat('d M Y', $this->start_dt)->hour($this->start_hr)->minute($this->start_min);
Is there a more cleaner way to create a carbon date without having to chain the hours and minutes and to set the seconds to 00?
Maybe something like this but it doesn't work:
Carbon::createFromFormat('d M Y H:i', $this->start_dt, $this->start_hr, $this->start_min);
* UPDATE *
Manage to figure out:
Carbon::createFromFormat('d M Y H:i:s', $this->start_dt . ' ' . $this->start_hr . ':'. $this->start_min . ':00');