@CharlesOct 03.2006 — #It would be way easier but javaScript doesn't have times, it has date-times. You have to give your time a date:alert (new Date (new Date().toDateString() + ' ' + '10:55'))
@TheBearMayOct 03.2006 — #<i> </i>var a = "10:15" var b = toDate(a,"h:m") alert(b); function toDate(dStr,format) { var now = new Date(); if (format == "h:m") { now.setHours(dStr.substr(0,dStr.indexOf(":"))); now.setMinutes(dStr.substr(dStr.indexOf(":")+1)); now.setSeconds(0); return now; }else return "Invalid Format"; }