public function Carbon::setTimeFromTimeString in Persian Date for Drupal 8 8.4
Set the time by time string
Parameters
string $time:
Return value
static
1 call to Carbon::setTimeFromTimeString()
- Carbon::addWeekdays in src/
Library/ Carbon/ Carbon.php - Add weekdays to the instance. Positive $value travels forward while negative $value travels into the past.
File
- src/
Library/ Carbon/ Carbon.php, line 890
Class
- Carbon
- A simple API extension for DateTime
Namespace
Drupal\persian_date\Library\CarbonCode
public function setTimeFromTimeString($time) {
$time = explode(':', $time);
$hour = $time[0];
$minute = isset($time[1]) ? $time[1] : 0;
$second = isset($time[2]) ? $time[2] : 0;
return $this
->setTime($hour, $minute, $second);
}