/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> var current_date = new Date(); var day = current_date.getDay(); var day_number = current_date.getDate(); var month = current_date.getMonth(); var year = current_date.getFullYear(); var day_table = new Array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"); var month_table = new Array("Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Decembre"); document.write( day_table[day] + " " + day_number + " " + month_table[month] + " " + year); //ex : Lundi 1 Octobre 2003 </script>