1 date.inc | date_month_names($required = FALSE) |
Returns a translated array of month names.
Parameters
bool $required: (optional) If FALSE, the returned array will include a blank value. Defaults to FALSE.
Return value
array: An array of month names.
File
- core/
includes/ date.inc, line 111 - Date API functions.
Code
function date_month_names($required = FALSE) {
$month_names = array();
foreach (date_month_names_untranslated() as $key => $month) {
$month_names[$key] = t($month, array(), array('context' => 'Long month name'));
}
$none = array('' => '');
return !$required ? $none + $month_names : $month_names;
}