Javascript Date Object from string in form 'HH-MM' -
hey, wondering how convert hh:mm
string javascript date
object. have tried new date(string);
, mydate.settime()
no avail.
a side question be: how convert string in hh:mm
milliseconds jan 1, 1970.
thanks in advance.
in javascript, i'm using datejs library. http://www.datejs.com/ if include library, have function called "parseexact" , use this:
var datestring = "10-12"; var date = new date.parseexact(datestring, "hh-mm");
to miliseconds, can download file time.js http://code.google.com/p/datejs/source/browse/trunk/#trunk/src. have function gettotalmilliseconds() can use:
var mseconds = date.gettotalmilliseconds();
i hope little bit.
Comments
Post a Comment