javascript - Date formatting -
using following:
var date = new date(parseint(jsondate.substr(6)));
i get:
mon feb 22 1993 00:00:00 gmt+0000 (gmt standard time)
how format too
22-02-1993
?
you use getfullyear
, getmonth
(note values start 0
), , getdate
functions on date
instance, assemble string. (those links specification, can hard read; mdc bit better.)
or use library datejs (although hasn't been maintained in quite time) or joidegn mentions, moment.js.
Comments
Post a Comment