From 2ae8d25d188299b2553cbc81aacad59afdb38fa3 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Mon, 19 Jul 2010 13:04:30 +0200 Subject: [PATCH] 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) --- Foundation/CPDate.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundation/CPDate.j b/Foundation/CPDate.j index 07ff8fbb3..3ecdd21a4 100644 --- a/Foundation/CPDate.j +++ b/Foundation/CPDate.j @@ -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