From d11a3fe694759d997124a08e12aa7508d94df949 Mon Sep 17 00:00:00 2001 From: znek Date: Sat, 12 Feb 2005 19:13:26 +0000 Subject: [PATCH] additions git-svn-id: http://svn.opengroupware.org/SOPE/trunk@551 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-core/NGExtensions/ChangeLog | 4 ++++ sope-core/NGExtensions/NGCalendarDateRange.m | 3 +++ sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h | 2 ++ sope-core/NGExtensions/Version | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sope-core/NGExtensions/ChangeLog b/sope-core/NGExtensions/ChangeLog index fa1cd364..45213e0e 100644 --- a/sope-core/NGExtensions/ChangeLog +++ b/sope-core/NGExtensions/ChangeLog @@ -1,3 +1,7 @@ +2005-02-12 Marcus Mueller + + * NGCalendarDateRange.[hm]: new method -duration (v4.5.145) + 2005-02-09 Marcus Mueller * FdExt.subproj/NSCalendarDate+misc.m: Julian number <-> date diff --git a/sope-core/NGExtensions/NGCalendarDateRange.m b/sope-core/NGExtensions/NGCalendarDateRange.m index c4d3f899..baed5ff5 100644 --- a/sope-core/NGExtensions/NGCalendarDateRange.m +++ b/sope-core/NGExtensions/NGCalendarDateRange.m @@ -142,6 +142,9 @@ return YES; } +- (NSTimeInterval)duration { + return [self->endDate timeIntervalSinceDate:self->startDate]; +} /* comparison */ diff --git a/sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h b/sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h index 9724ee96..e3c270c1 100644 --- a/sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h +++ b/sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h @@ -57,6 +57,8 @@ - (BOOL)containsDate:(NSCalendarDate *)date; - (BOOL)containsDateRange:(NGCalendarDateRange *)_range; +- (NSTimeInterval)duration; + @end @interface NSArray(NGCalendarDateRanges) diff --git a/sope-core/NGExtensions/Version b/sope-core/NGExtensions/Version index 2451bb22..1b28f6da 100644 --- a/sope-core/NGExtensions/Version +++ b/sope-core/NGExtensions/Version @@ -1,6 +1,6 @@ # version -SUBMINOR_VERSION:=144 +SUBMINOR_VERSION:=145 # v4.3.115 requires libFoundation v1.0.59 # v4.2.72 requires libEOControl v4.2.39 -- 2.39.5