1

In JavaScript:

var todayDate = new Date();

How to convert the actual date to this format (example):

Mon Aug 25 2014 
delux
  • 1,694
  • 10
  • 33
  • 64

2 Answers2

2

toDateString() gives you exactly that format.

var todayDate = new Date();
todayDate.toDateString(); // "Thu Aug 14 2014"
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
0

You can use plugins like Moment.js or you can just ...todayDate.getDay() + ' ' + todayDate.getFullYear()

monkeyinsight
  • 4,719
  • 1
  • 20
  • 28