DEV Community

Cover image for Today date using Javascript
Carlos Alberto
Carlos Alberto

Posted on

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

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more