function map_month

7.x form.inc map_month($month)
6.x form.inc map_month($month)

Helper function for usage with drupal_map_assoc to display month names.

Related topics

1 call to map_month()
profile_view_field in drupal-7.x/modules/profile/profile.module
1 string reference to 'map_month'
form_process_date in drupal-7.x/includes/form.inc
Expands a date element into year, month, and day select elements.

File

drupal-7.x/includes/form.inc, line 2995
Functions for form and batch generation and processing.

Code

function map_month($month) {
  $months = &drupal_static(__FUNCTION__, array(
    1 => 'Jan',
    2 => 'Feb',
    3 => 'Mar',
    4 => 'Apr',
    5 => 'May',
    6 => 'Jun',
    7 => 'Jul',
    8 => 'Aug',
    9 => 'Sep',
    10 => 'Oct',
    11 => 'Nov',
    12 => 'Dec',
  ));
  return t($months[$month]);
}