I\'m trying to use JS to turn a date object
into a string in YYYYMMDD
format. Is there an easier way than concatenating Date.getYear()
This guy here => http://blog.stevenlevithan.com/archives/date-time-format wrote a format()
function for the Javascript's Date
object, so it can be used with familiar literal formats.
If you need full featured Date formatting in your app's Javascript, use it. Otherwise if what you want to do is a one off, then concatenating getYear(), getMonth(), getDay() is probably easiest.