Using `==` for Dates does actually not work, only `<` and `>` works. The
following returns `false`:


var x = Date.now(); var x1 = new Date(x); var x2 = new Date(x); x1 == x2


On Fri, Feb 7, 2014 at 9:42 AM, Ben Lesh <notifications@github.com> wrote:

> In src/ng/directive/input.js:
>
> > +}
> > +
> > +function weekParser(isoWeek) {
> > +   if(isDate(isoWeek)) {
> > +      return +isoWeek;
> > +   }
> > +
> > +   if(isString(isoWeek)) {
> > +      WEEK_REGEXP.lastIndex = 0;
> > +      var parts = WEEK_REGEXP.exec(isoWeek);
> > +      if(parts) {
> > +         var year = +parts[1],
> > +            week = +parts[2],
> > +            firstThurs = getFirstThursday(year),
> > +            addDays = (week - 1) * 7;
> > +         return +new Date(year, 0, firstThurs.getDate() + addDays);
>
> Removed conversion to milliseconds entirely. Comparing Dates with > or ==works as far back as IE6. Also, I'm going to change the name of that
> getTime function I'm passing in, as I think that arose from a
> misunderstanding of one of Igor's comments in the other PR. It's really a
> date parsing function now, and should be named something more appropriate.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/angular/angular.js/pull/5864/files#r9547692>
> .
>