By TransitionKojo on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Introduced in version:
8.x-dev
Issue links:
Description:
There is a new theme function for the HTML5 <time> tag that has a 'datetime' attribute:
Added theme function
Added format_date() formats
'html_datetime''html_date''html_time''html_yearless_date''html_week''html_month''html_year'
Usage example
from aggregator-feed-source.tpl.php:
if ($feed->checked) {
$variables['last_checked'] = theme('datetime', array(
'datetime' => $feed->checked,
'text' => t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked)))
));
}
else {
$variables['last_checked'] = t('never');
}
Impacts:
Module developers
Themers
Comments
The aggregator source
The aggregator source template is being updated to use datetime.
http://drupal.org/node/1189804
I'm in the process of updating other aggregator templates to use this function as well.