]> err.no Git - sope/commitdiff
-containsDateRange: convenience method added
authorznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 16 Dec 2004 14:21:47 +0000 (14:21 +0000)
committerznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 16 Dec 2004 14:21:47 +0000 (14:21 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@448 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-core/NGExtensions/ChangeLog
sope-core/NGExtensions/NGCalendarDateRange.m
sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h
sope-core/NGExtensions/Version

index 0cbf627987d237dfdebec8e43198aeca52bf4fde..94055a7b3acc7cc772d39d6c5b1952c264cb023c 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-16  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * NGCalendarDateRange.[hm]: new convenience method -containsDateRange:
+         (v4.5.140)
+
 2004-12-14  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * NGExtensions.xcode: minor fixes and updated
index 1c3e9dcfa535067f2045675f605f23ecbbb71a24..31d0eb2ef7477cc9d6c335e7414e060157693d06 100644 (file)
          [self->endDate compare:date] == NSOrderedDescending) ? YES : NO;
 }
 
+- (BOOL)containsDateRange:(NGCalendarDateRange *)_range {
+  NSComparisonResult result;
+
+  result = [self->startDate compare:[_range startDate]];
+  if (!((result == NSOrderedSame) || (result == NSOrderedAscending)))
+    return NO;
+  result = [self->endDate compare:[_range endDate]];
+  if (result == NSOrderedAscending)
+    return NO;
+  return YES;
+}
+
+
 /* comparison */
 
 - (BOOL)isEqual:(id)other {
index 37600647b9249962f570d15eb1d2646e496ca875..9b6be15999d4fb378cad2484c417f50bfd18584d 100644 (file)
@@ -56,6 +56,7 @@
 - (BOOL)doesIntersectWithDateRange:(NGCalendarDateRange *)_other;
 
 - (BOOL)containsDate:(NSCalendarDate *)date;
+- (BOOL)containsDateRange:(NGCalendarDateRange *)_range;
 
 @end
 
index bc7a0732529bda9c72616fd5f14b41620389ac72..c0e8b131e7c773d21d8bc84faf4f2f7bc4f9d87b 100644 (file)
@@ -1,6 +1,6 @@
 # version
 
-SUBMINOR_VERSION:=139
+SUBMINOR_VERSION:=140
 
 # v4.3.115 requires libFoundation v1.0.59
 # v4.2.72  requires libEOControl  v4.2.39