1

In JavaScript:

var todayDate = new Date();

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

Mon Aug 25 2014 
delux
  • 1,154
  • 5
  • 18
  • 40

2 Answers2

2

toDateString() gives you exactly that format.

var todayDate = new Date();
todayDate.toDateString(); // "Thu Aug 14 2014"
rink.attendant.6
  • 36,468
  • 57
  • 89
  • 143
0

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

monkeyinsight
  • 4,024
  • 1
  • 16
  • 26