function map_month

Helper function for usage with drupal_map_assoc to display month names.

Related topics

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

File

includes/form.inc, line 3162

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]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.