-
Notifications
You must be signed in to change notification settings - Fork 4
/
MultiresDateFormatter.h
37 lines (29 loc) · 935 Bytes
/
MultiresDateFormatter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// MultiresDateFormatter.h
// AAPLot
//
// Created by admin on 3/23/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef enum _MultiresDateResolution {
MultiresDateResolutionHours,
MultiresDateResolutionDays,
MultiresDateResolutionMonths,
} MultiresDateResolution;
@protocol MultiresDateFromIndexConverter
@optional
- (NSDate*)dateFromIndex:(NSDecimalNumber *)index;
@end
@interface MultiresDateFormatter : NSNumberFormatter {
@private
NSDate *startDate;
NSDate *endDate;
NSUInteger numIndices;
MultiresDateResolution resolution;
NSDateFormatter *dateFormatter;
id <MultiresDateFromIndexConverter> indexConverter;
}
@property (nonatomic,readwrite,assign) id <MultiresDateFromIndexConverter> indexConverter;
- (id)initWithStartDate:(NSDate*)aStartDate endDate:(NSDate*)aEndDate /*numIndices:(NSUInteger)aNumIndices*/;
@end