protected static Datetime::getHtml5TimeFormat($element)
Retrieves the right format for a HTML5 time element.
The format is important because these elements will not work with any other format.
Parameters
string $element: The $element to assess.
Return value
string Returns the right format for the time element, or the original format if this is not a HTML5 element.
File
- core/lib/Drupal/Core/Datetime/Element/Datetime.php, line 419
Class
- Datetime
- Provides a datetime element.
Namespace
Drupal\Core\Datetime\Element
Code
1 2 3 4 5 6 7 8 9 | protected static function getHtml5TimeFormat( $element ) { switch ( $element [ '#date_time_element' ]) { case 'time' : return DateFormat::load( 'html_time' )->getPattern(); default : return $element [ '#date_time_format' ]; } } |
Please login to continue.