From 8d2f0b36db792d193c77ef3c2f5382f5ee59e296 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Tue, 20 Nov 2007 18:37:25 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1272 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SoObjects/Appointments/iCalEvent+SOGo.h | 35 +++++++++++++++++++++++ SoObjects/Appointments/iCalEvent+SOGo.m | 38 +++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 SoObjects/Appointments/iCalEvent+SOGo.h create mode 100644 SoObjects/Appointments/iCalEvent+SOGo.m diff --git a/SoObjects/Appointments/iCalEvent+SOGo.h b/SoObjects/Appointments/iCalEvent+SOGo.h new file mode 100644 index 00000000..8250b23b --- /dev/null +++ b/SoObjects/Appointments/iCalEvent+SOGo.h @@ -0,0 +1,35 @@ +/* iCalEvent+SOGo.h - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef ICALEVENT_SOGO_H +#define ICALEVENT_SOGO_H + +#import + +@interface iCalEvent (SOGoExtensions) + +- (BOOL) isStillRelevant; + +@end + + +#endif /* ICALEVENT_SOGO_H */ diff --git a/SoObjects/Appointments/iCalEvent+SOGo.m b/SoObjects/Appointments/iCalEvent+SOGo.m new file mode 100644 index 00000000..f795d3f7 --- /dev/null +++ b/SoObjects/Appointments/iCalEvent+SOGo.m @@ -0,0 +1,38 @@ +/* iCalEvent+SOGo.m - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#import + +#import "iCalEvent+SOGo.h" + +@implementation iCalEvent (SOGoExtensions) + +- (BOOL) isStillRelevant +{ + NSCalendarDate *now; + + now = [NSCalendarDate calendarDate]; + + return ([[self endDate] earlierDate: now] == now); +} + +@end -- 2.39.5