Revision: 12538
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 18, 2009 13:29 by remilauber
Initial Code
/*
* How to use
*
* date = new Date();
* alert(date.getFrenchDay());
* alert(date.getFrenchMonth());
*/
Date.prototype.getFrenchDay = function()
{
var days = [
'lundi',
'mardi',
'mercredi',
'jeudi',
'vendredi',
'samedi',
'dimanche',
];
return days[this.getDay()];
}
Date.prototype.getFrenchMonth = function()
{
var months = [
'janvier',
'février',
'mars',
'avril',
'mai',
'juin',
'juillet',
'aout',
'septembre',
'octobre',
'novembre',
'décembre',
];
return months[this.getMonth()];
}
Initial URL
Initial Description
Initial Title
Get a French date
Initial Tags
date
Initial Language
JavaScript