Created
June 25, 2012 15:51
-
-
Save leocavalcante/2989389 to your computer and use it in GitHub Desktop.
returns the name of the given month (pt)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ( global, undefined ) { | |
var months = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro']; | |
function monthName ( month, short ) { | |
month = parseInt( month ) - 1; | |
return short && month !== 4 ? months[month].slice( 0, 3 ) : months[month]; | |
} | |
global.monthName = global.monthName || monthName; | |
} ( this )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment