1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
/* emacs buffer mode hint -*- objc -*- */
#import <Foundation/Foundation.h>
#import "Date.h"
@interface DateRange : NSObject
{
Date *_start;
NSTimeInterval _length;
}
- (id)initWithStart:(Date *)date duration:(NSTimeInterval)seconds;
- (id)initWithDay:(Date *)day;
- (void)setStart:(Date *)start;
- (void)setLength:(NSTimeInterval)seconds;
- (Date *)start;
- (NSTimeInterval)length;
- (BOOL)contains:(Date *)date;
- (BOOL)intersectsWith:(DateRange *)range;
- (BOOL)intersectsWithDay:(Date *)day;
- (NSRange)intersectionWithDay:(Date *)day;
@end
|