annotate core/modules/system/templates/time.html.twig @ 5:12f9dff5fda9
tip
Update to Drupal core 8.7.1
author |
Chris Cannam |
date |
Thu, 09 May 2019 15:34:47 +0100 |
parents |
c75dbcec494b |
children |
|
rev |
line source |
Chris@0
|
1 {#
|
Chris@0
|
2 /**
|
Chris@0
|
3 * @file
|
Chris@0
|
4 * Default theme implementation for a date / time element.
|
Chris@0
|
5 *
|
Chris@0
|
6 * Available variables
|
Chris@0
|
7 * - timestamp: (optional) A UNIX timestamp for the datetime attribute. If the
|
Chris@0
|
8 * datetime cannot be represented as a UNIX timestamp, use a valid datetime
|
Chris@0
|
9 * attribute value in attributes.datetime.
|
Chris@0
|
10 * - text: (optional) The content to display within the <time> element.
|
Chris@0
|
11 * Defaults to a human-readable representation of the timestamp value or the
|
Chris@5
|
12 * datetime attribute value using DateFormatter::format().
|
Chris@0
|
13 * - attributes: (optional) HTML attributes to apply to the <time> element.
|
Chris@0
|
14 * A datetime attribute in 'attributes' overrides the 'timestamp'. To
|
Chris@0
|
15 * create a valid datetime attribute value from a UNIX timestamp, use
|
Chris@5
|
16 * DateFormatter::format() with one of the predefined 'html_*' formats.
|
Chris@0
|
17 *
|
Chris@0
|
18 * @see template_preprocess_time()
|
Chris@0
|
19 * @see http://www.w3.org/TR/html5-author/the-time-element.html#attr-time-datetime
|
Chris@0
|
20 */
|
Chris@0
|
21 #}
|
Chris@0
|
22 <time{{ attributes }}>{{ text }}</time>
|