Return to Snippet

Revision: 25891
at April 15, 2010 06:48 by alexandrepayet


Updated Code
<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>

Revision: 25890
at April 13, 2010 08:46 by alexandrepayet


Initial Code
<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>

Initial URL

                                

Initial Description

                                

Initial Title
JAVASCRIPT : Récupérer date en javascript (date du client)

Initial Tags
javascript, js, date

Initial Language
JavaScript