javascript - converting a certain time format into a Date Object -
i timestamp api "2015-04-03t19:04:00" , every week updated. want use countdown.js , have played around with date in format new date(year, month, days, hour, minutes)
...
it works:
$('.counttime').countdown({until : new date(year, month, days, hour, minutes)})
basically want know best way convertthe string api date object think countdown.js accepts above. split string arrays dashes , colons , delete "t"? or there javascript function convert formats? concerned saying 19:04 when experimenting used 12 hours not 24 hours. wonder if put in 19:04 , correct countdown
new date('2015-04-03t19:04:00')
Comments
Post a Comment