Hi, Im using date.js to compare to dates that are written in user friendly string form(Sat, 1 July 2006 12:34:14). I use this code.
function is_new(lasttime, newtime){
lasttime = Date.parse(lastime);
newtime = Date.parse(newtime);
if(lasttime.isBefore(newtime)){
return true;
}else{
return false;
}
}
Both lasttime and newtime are strings like above. When I try this i get
Uncaught TypeError: Object Tue Dec 30 1997 00:00:00 GMT+0000 (GMT Standard Time) has no method 'isBefore'