diff --git a/includes/common.inc b/includes/common.inc index 4ec37dc..22e6d9e 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -6403,6 +6403,9 @@ function drupal_common_theme() { 'render element' => 'elements', 'template' => 'region', ), + 'datetime' => array( + 'variables' => array('timestamp' => null, 'pubdate' => false, 'format_type' => null, 'custom' => null,), + ), 'status_messages' => array( 'variables' => array('display' => NULL), ), diff --git a/includes/theme.inc b/includes/theme.inc index c211248..ed74729 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1312,6 +1312,36 @@ function theme_disable($theme_list) { */ /** + * Returns html for a date / time. + * + * @params $variables + * An associative array containing: + * - timestamp: The Unix style timestamp to be themed. + * - format_type: The date format type to be used for the displayed date / time. + * - custom: The custom formatter to be used if 'format_type' is set to 'custome'. + * - pubdate: (optional) A boolean value for the pubdate attribute, defaults to false. + */ +function theme_datetime($variables) { + $output = ''; + + $output .= format_date($variables['timestamp'], $variables['format_type'], $variables['custom']); + + $output .= ''; + + return $output; +} + +/** * Returns HTML for status and/or error messages, grouped by type. * * An invisible heading identifies the messages for assistive technology.