JavaScript side fix - date string parsed to miliseconds instead of Date object (related to equality comparison issue - now == operator compares numbers instead of Date objects, which was always false). Why getTime() instead of + unary operator? - readability and speed: http://jsperf.com/comparing-date-objects/, http://xkr.us/articles/javascript/unary-add/).