1

In JavaScript:

var todayDate = new Date();

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

Mon Aug 25 2014 
delux
  • 1,416
  • 5
  • 26
  • 57

2 Answers2

2

toDateString() gives you exactly that format.

var todayDate = new Date();
todayDate.toDateString(); // "Thu Aug 14 2014"
rink.attendant.6
  • 40,889
  • 58
  • 100
  • 149
0

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

monkeyinsight
  • 4,389
  • 1
  • 18
  • 28