You are here

function theme_nd_post_date in Node displays 6.3

Same name and namespace in other branches
  1. 6.2 nd.module \theme_nd_post_date()

Post date formatter.

1 string reference to 'theme_nd_post_date'
nd_theme in ./nd.module
Implementation of hook_theme().

File

./nd.module, line 660
Node displays.

Code

function theme_nd_post_date($field) {
  $date_format = str_replace('nd_post_date_', '', $field['formatter']);
  if (module_exists('date_api')) {
    $datetime = date_make_date($field['object']->created, NULL, DATE_UNIX);
    $format = variable_get('date_format_' . $date_format, 'd/m/Y');
    return date_format_date($datetime, 'custom', $format);
  }
  else {
    return format_date($field['object']->created, $date_format);
  }
}