snippets / getFrenchMonthByInt

Language: Php - First posted by juliend2 on 2008-04-10 02:43 (7 months, 2 weeks)
Link to the snippet: http://www.friendsnippets.org/snippet/242/

prends en paramètre un INT du mois, et retourne un String du mois correspondant

 1 function getFrenchMonthByInt($mois)
2 {
3 $arrayMois = array( 1=>'Janvier',
4 2=>'Février',
5 3=>'Mars',
6 4=>'Avril',
7 5=>'Mai',
8 6=>'Juin',
9 7=>'Juillet',
10 8=>'Août',
11 9=>'Septembre',
12 10=>'Octobre',
13 11=>'Novembre',
14 12=>'Décembre'
15 );
16
17 return $arrayMois[$mois];
18 }
In order to post a comment, you should have a friendsnippet account. Please sign-in.

0 comments

Apr '08
  • prends en paramètre un INT du mois, et retourne un String du mois correspondant

Common Tags



snippet History

Apr '08