don't use === for date equality checking

Apparently this will return false for equal dates, reverted the actual equality check to what was already in Cappuccino before my fix !(date < otherDate || date > otherDate)
This commit is contained in:
Klaas Pieter Annema committed 2010-07-19 13:10:15 +02:00
1 parent 564668587c
commit 2ae8d25d18
1 file changed
+1 -1
+1 -1
View File
@@ -162,7 +162,7 @@ var CPDateReferenceDate = new Date(Date.UTC(2001, 1, 1, 0, 0, 0, 0));
if (!aDate)
return NO;
return self === aDate;
return !(self < aDate || self > aDate);
}
- (CPComparisonResult)compare:(CPDate)anotherDate