У меня есть две переменные:
date1 = Mon Nov 25 2013 00:00:00 GMT+0530 (IST)
date2 = Mon Nov 25 2013 14:13:55 GMT+0530 (IST)
Когда я сравниваю две даты, я получаю, что date2
больше, что мне нужно, правильно. Но я не хочу проверять временную часть двух дат, которые у меня есть. Как я мог получить только часть даты из этих двух дат и сравнить ее?
var today = new Date(); //Mon Nov 25 2013 14:13:55 GMT+0530 (IST)
d = new Date(my_value); //Mon Nov 25 2013 00:00:00 GMT+0530 (IST)
if(d>=today){ //I need to check the date parts alone.
alert(d is greater than or equal to current date);
}