With some help from some fellow stack users, I currently have this:
The JSON data gives me the {start.date} in YYYY-MM-DD formatting, but I would like to know how to implement a date change to:
Mon 01 Jan
With some help from some fellow stack users, I currently have this:
The JSON data gives me the {start.date} in YYYY-MM-DD formatting, but I would like to know how to implement a date change to:
Mon 01 Jan
Convert your date string "2012-05-29" to Date object:
var parts = date.split("-");
var d = new Date(parts[0], parts[1], parts[2]);
Then use dateFormat from here:
return d.format("ddd dd mmm");
date variable. You should be able to just pass in date as-is using new Date(date), and it will give you the correct date, assuming you ask for it in UTC.