| 1 |
<?php |
<?php |
| 2 |
// $Id: date.module,v 1.61.2.4.2.34 2008/11/28 13:19:40 karens Exp $ |
// $Id: date.module,v 1.61.2.4.2.35 2008/11/30 18:49:28 karens Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 223 |
'short' => array('label' => t('Short'), |
'short' => array('label' => t('Short'), |
| 224 |
'field types' => array('date', 'datestamp', 'datetime'), |
'field types' => array('date', 'datestamp', 'datetime'), |
| 225 |
'multiple values' => CONTENT_HANDLE_CORE), |
'multiple values' => CONTENT_HANDLE_CORE), |
| 226 |
|
'time' => array('label' => t('Time'), |
| 227 |
|
'field types' => array('date', 'datestamp', 'datetime'), |
| 228 |
|
'multiple values' => CONTENT_HANDLE_CORE), |
| 229 |
|
'time_timezone' => array('label' => t('Time with timezone'), |
| 230 |
|
'field types' => array('date', 'datestamp', 'datetime'), |
| 231 |
|
'multiple values' => CONTENT_HANDLE_CORE), |
| 232 |
'iso' => array('label' => t('ISO'), |
'iso' => array('label' => t('ISO'), |
| 233 |
'field types' => array('date', 'datestamp', 'datetime'), |
'field types' => array('date', 'datestamp', 'datetime'), |
| 234 |
'multiple values' => CONTENT_HANDLE_CORE), |
'multiple values' => CONTENT_HANDLE_CORE), |
| 288 |
'date_formatter_feed' => array( |
'date_formatter_feed' => array( |
| 289 |
'arguments' => array('element' => NULL), |
'arguments' => array('element' => NULL), |
| 290 |
'function' => 'theme_date_display_combination'), |
'function' => 'theme_date_display_combination'), |
| 291 |
|
'date_formatter_time' => array( |
| 292 |
|
'arguments' => array('element' => NULL), |
| 293 |
|
'function' => 'theme_date_display_combination'), |
| 294 |
|
'date_formatter_time_timezone' => array( |
| 295 |
|
'arguments' => array('element' => NULL), |
| 296 |
|
'function' => 'theme_date_display_combination'), |
| 297 |
'date_formatter_format_interval' => array( |
'date_formatter_format_interval' => array( |
| 298 |
'arguments' => array('element' => NULL), |
'arguments' => array('element' => NULL), |
| 299 |
'function' => 'theme_date_format_interval'), |
'function' => 'theme_date_format_interval'), |
| 531 |
$field = $fields[$field_name]; |
$field = $fields[$field_name]; |
| 532 |
// Any date might have a timezone format. |
// Any date might have a timezone format. |
| 533 |
$field['granularity'][] = 'timezone'; |
$field['granularity'][] = 'timezone'; |
| 534 |
|
$format = variable_get('date_format_short', 'm/d/Y - H:i'); |
| 535 |
|
|
| 536 |
switch ($formatter) { |
switch ($formatter) { |
| 537 |
|
case 'time': |
| 538 |
|
return date_limit_format($format, array('hour', 'minute', 'second')); |
| 539 |
|
case 'time_timezone': |
| 540 |
|
return date_limit_format($format .' e', array('hour', 'minute', 'second', 'timezone')); |
| 541 |
case 'ical': |
case 'ical': |
| 542 |
return 'Ymd\THis'; |
return 'Ymd\THis'; |
| 543 |
case 'timestamp': |
case 'timestamp': |