# Writing the date in English (with javaScript )

**URL:** https://forum.kirupa.com/t/writing-the-date-in-english-with-javascript/308608
**Category:** web dev
**Created:** [April 26, 2010, 11:02pm UTC](https://forum.kirupa.com/t/writing-the-date-in-english-with-javascript/308608 "2010-04-26T23:02:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![boebarl1](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@boebarl1](https://forum.kirupa.com/u/boebarl1)
#### Post date: [April 26, 2010, 11:02pm UTC](https://forum.kirupa.com/t/writing-the-date-in-english-with-javascript/308608/1 "2010-04-26T23:02:39Z")

</div>

I am writing this java script code to simply write the date. My code will display the month, day and year, but it does it with numbers? I tried to create an array for the getDay function so that it would convert the number of month to the English word and display that. I am having problems with my syntax I think. Anyone got any tips?

\<script type = “text/javascript”\>  
var now = new Date();  
var year = now.getYear();  
var month = now.getMonth();  
var day = now.getDay(rday);

var rday = [“Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”];

document.write("\<p\>" + day + “\</p\>”);

\</script\>
