public function Time::__construct in Time Field For Drupal 8.x / 9.x 8
Same name and namespace in other branches
- 2.x src/Time.php \Drupal\time_field\Time::__construct()
Create Time instance.
Parameters
int $hour: Time hour.
int $minute: Time minute.
int $second: Time seconds.
File
- src/
Time.php, line 43
Class
- Time
- Time class represents time of day.
Namespace
Drupal\time_fieldCode
public function __construct($hour = 0, $minute = 0, $second = 0) {
self::assertInRange($hour, 0, 23);
self::assertInRange($minute, 0, 59);
self::assertInRange($second, 0, 59);
$this->hour = $hour;
$this->minute = $minute;
$this->second = $second;
}