Today date using Javascript

charlygarcia120

Carlos Alberto

Posted on October 13, 2022

Today date using Javascript

How to write today date using javascript

<html>
<body>
Today date is : 
<script>
var meses = new Array ("01","02","03","04","05","06","07","08","09","10","11","12");
var diasSemana = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
var f=new Date();
var today = (diasSemana[f.getDay()] + ", " + f.getDate() + "/" +meses[f.getMonth()] + "/" + f.getFullYear());
document.write(today);
</script>
</body>
</html>

Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
charlygarcia120
Carlos Alberto

Posted on October 13, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related