diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-11-03 09:54:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-11-03 09:54:43 +0000 |
commit | b963755551a69a2a51e562d87b78fe5ebac87805 (patch) | |
tree | b36e6d3e05c70b9a079f9038fd94f2934b51e3e3 /includes/form.inc | |
parent | a28f1ad9d27ec5e9d9b4e5d5b5f9d61efcd12ac0 (diff) | |
download | brdo-b963755551a69a2a51e562d87b78fe5ebac87805.tar.gz brdo-b963755551a69a2a51e562d87b78fe5ebac87805.tar.bz2 |
- Patch #329273 by Damien Tournoud: make map_month() happier.
Diffstat (limited to 'includes/form.inc')
-rw-r--r-- | includes/form.inc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc index d170a1a91..9799aeca0 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -1716,7 +1716,21 @@ function date_validate($form) { * Helper function for usage with drupal_map_assoc to display month names. */ function map_month($month) { - return format_date(gmmktime(0, 0, 0, $month, 2, 1970), 'custom', 'M', 0); + static $months = 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]); } /** |