function availability_calendar_date_formats in Availability Calendars 7.5
Same name and namespace in other branches
- 7.3 availability_calendar.module \availability_calendar_date_formats()
- 7.4 availability_calendar.module \availability_calendar_date_formats()
Implements hook_date_formats(). @link http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct...
File
- ./
availability_calendar.module, line 273
Code
function availability_calendar_date_formats() {
$formats = array();
// Some defaults for date display (booking formlet).
// @todo: locale suggestions are welcome.
$formats[] = array(
'type' => 'availability_calendar_date_display',
'format' => AC_DATE_DISPLAY,
'locales' => array(),
);
$formats[] = array(
'type' => 'availability_calendar_date_display',
'format' => 'l F j, Y',
'locales' => array(
'en-us',
),
);
// Some defaults for user entry in date fields (Views).
// Locales mostly copied from the short format in includes/date.inc.
$formats[] = array(
'type' => 'availability_calendar_date_entry',
'format' => AC_DATE_ENTRY,
'locales' => array(),
);
$formats[] = array(
'type' => 'availability_calendar_date_entry',
'format' => 'Y/n/j',
'locales' => array(
'en-ca',
'fr-ca',
'no-no',
'sv-se',
),
);
$formats[] = array(
'type' => 'availability_calendar_date_entry',
'format' => 'j-n-Y',
'locales' => array(
'nl-nl',
),
);
$formats[] = array(
'type' => 'availability_calendar_date_entry',
'format' => 'j/n/Y',
'locales' => array(
'en-gb',
'en-hk',
'en-ie',
'el-gr',
'es-es',
'fr-be',
'fr-fr',
'fr-lu',
'it-it',
'nl-be',
'pt-pt',
),
);
$formats[] = array(
'type' => 'availability_calendar_date_entry',
'format' => 'j.n.Y',
'locales' => array(
'de-ch',
'de-de',
'de-lu',
'fi-fi',
'fr-ch',
'is-is',
'pl-pl',
'ro-ro',
'ru-ru',
),
);
$formats[] = array(
'type' => 'availability_calendar_date_entry',
'format' => 'n/j/Y',
'locales' => array(
'en-us',
),
);
// A default for the month caption when theming a calendar month.
$formats[] = array(
'type' => 'availability_calendar_month_caption',
'format' => AC_DATE_MONTH_CAPTION,
'locales' => array(),
);
return $formats;
}