I have a simply compare in my *.s file:
var lastSelectedDate = new Date(DateConvert(value));
var todayDate = new Date($.now());
if (lastSelectedDate < todayDate) {
return false;
}
else {
return true;
}
When I reach if
, I have second values:
lastSelectedDate = Thu Apr 23 2015 00:00:00 GMT+300
todayDate = Thu Apr 23 2015 15:18:31 GMT+300
It is obvious that lastSelectedDate < todayDate
BUT, the thing is, I need to compare those dates without time (condition is for lastSelectedDate to be greater or equal).
Ofcourse It can be done by using .getDay() .getMonth() .getYear() but is there another way to exclude time from it? Without additional libraries?