 	
 	:returns: true if two dates are equals
 	*/
-	func isEqualToDate(date: NSDate, ignoreTime: Bool) -> Bool {
-		if ignoreTime {
-			let comp1 = NSDate.components(fromDate: self)
-			let comp2 = NSDate.components(fromDate: date)
-			return ((comp1.era == comp2.era) && (comp1.year == comp2.year) && (comp1.month == comp2.month) && (comp1.day == comp2.day))
-		} else {
-			return self.isEqualToDate(date)
-		}
-	}
-	
+    func isEqualToDate(date: NSDate, ignoreTime: Bool = false) -> Bool {
+        if ignoreTime {
+            return NSCalendar.currentCalendar().isDate(self, inSameDayAsDate: date)
+
+        } else {
+            return self.isEqualToDate(date)
+        }
+    }
+    
+    func isSameDayAsDate(date: NSDate) -> Bool {
+        return NSCalendar.currentCalendar().isDate(self, inSameDayAsDate: date)
+    }
+    
 	/**
 	Return true if given date's time in passed range
 	

	:returns: true if date is tomorrow
	*/
	func isTomorrow() -> Bool {
		return self.isEqualToDate(NSDate()+1.day, ignoreTime:true)
	}
	
	/**

	:returns: true if date is yesterday
	*/
	func isYesterday() -> Bool {
        return NSCalendar.currentCalendar().isDateInYesterday(self)
	}
	
	/**
