-
Notifications
You must be signed in to change notification settings - Fork 0
/
NSDateExtension.h
36 lines (26 loc) · 978 Bytes
/
NSDateExtension.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
//
// NSDateExtension.h
//
// Licensed by ruralcoder.com under the
// Creative Commons Attribution-ShareAlike 3.0 Unported License
#import <Foundation/Foundation.h>
@interface NSDate (Extension)
+ (NSDateFormatter*) getDateFormatter:(NSString*)format;
+ (NSDate*) dateFromString:(NSString*)formattedDate format:(NSString*)format isUTC:(BOOL)utcDate;
+ (NSDate*) dateFromString:(NSString*)formattedDate format:(NSString*)format ;
+ (NSDate*) dateFromUtcString:(NSString*)utcDate;
- (BOOL) isInFutureComparedTo:(NSDate*)other;
- (BOOL) isPast;
- (BOOL) isFuture;
- (BOOL) isThisDay;
- (BOOL) isThisWeek;
- (BOOL) isThisMonth;
- (BOOL) isThisYear;
- (NSString*) toFileTimestamp;
- (NSString*) toString;
- (NSString*) toTimeStamp;
- (NSString*) toStringWithLocale:(NSLocale*)locale;
- (NSString*) toTimeStampWithLocale:(NSLocale*)locale;
- (NSString*) toStringWithStyle:(NSDateFormatterStyle)style;
- (NSString*) toTimeStampWithStyle:(NSDateFormatterStyle)style;
@end