输出日期和年月

论坛: 

<div class="day"><?php print format_date($created, 'custom', 'j'); ?>-<?php print format_date($created, 'custom', 'M'); ?></div>

function mobilejkdian_preprocess_node(&$variables) {
  $uid = $GLOBALS['user']->uid;
  if(!$uid) {
    unset($variables['content']['links']['comment']['#links']['comment-add']);
  }
  else {
    $variables['content']['links']['comment']['#links']['comment-add']['title']='Add Comment';
  }
  $d = $variables['created'];
  $variables['day']=date('d', $d);
  $variables['my']=date('M/y', $d);
}

<?php print $day;?></span><?php print $my;?>