local->timestamp; $tokens['yyyy'] = date_show_date($date, 'Y'); $tokens['yy'] = date_show_date($date, 'y'); $tokens['month'] = date_show_date($date, 'F'); $tokens['mon'] = date_show_date($date, 'M'); $tokens['mm'] = date_show_date($date, 'm'); $tokens['m'] = date_show_date($date, 'n'); $tokens['ww'] = date_show_date($date, 'W'); $tokens['date'] = date_show_date($date, 'N'); $tokens['day'] = date_show_date($date, 'l'); $tokens['ddd'] = date_show_date($date, 'D'); $tokens['dd'] = date_show_date($date, 'd'); $tokens['d'] = date_show_date($date, 'j'); if (!empty($item['value2'])) { $item['value2'] = trim($item['value2']); $item_format = (is_numeric($item['value2']) ? DATE_UNIX : DATE_ISO); $date = date_make_date($item['value2'], 'none', 'local', $item_format); $tokens['to-value'] = $item['value2']; $tokens['to-view'] = $item['view2']; $tokens['to-timestamp'] = $date->local->timestamp; $tokens['to-yyyy'] = date_show_date($date, 'Y'); $tokens['to-yy'] = date_show_date($date, 'y'); $tokens['to-month'] = date_show_date($date, 'F'); $tokens['to-mon'] = date_show_date($date, 'M'); $tokens['to-mm'] = date_show_date($date, 'm'); $tokens['to-m'] = date_show_date($date, 'n'); $tokens['to-ww'] = date_show_date($date, 'W'); $tokens['to-date'] = date_show_date($date, 'N'); $tokens['to-day'] = date_show_date($date, 'l'); $tokens['to-ddd'] = date_show_date($date, 'D'); $tokens['to-dd'] = date_show_date($date, 'd'); $tokens['to-d'] = date_show_date($date, 'j'); } return $tokens; } }