You are here

function theme_nd_post_date in Display Suite 6.3

Post date formatter.

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

File

modules/nd/nd.module, line 653
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);
  }
}