-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDbDateUtils.h
More file actions
38 lines (27 loc) · 1014 Bytes
/
DbDateUtils.h
File metadata and controls
38 lines (27 loc) · 1014 Bytes
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
38
//
// DateUtils.h
// BaseUtils
//
// Created by John Huang on 11/19/14.
// Copyright (c) 2014 Sudobility. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DbDateUtils : NSObject
+ (NSDateFormatter *)gmtFormatter;
+ (NSDateFormatter *)localFormatter;
+ (NSString *)dateToServer:(NSDate *)date;
+ (NSDate *)dateFromServer:(NSString *)text;
+ (NSString *)datetimeToGmtServer:(NSDate *)date;
+ (NSDate *)datetimeFromGmtServer:(NSString *)text;
+ (NSString *)datetimeToGmtSqliteString:(NSDate *)date;
+ (NSDate *)datetimeFromGmtSqliteString:(NSString *)text;
+ (NSString *)dateToSqliteString:(NSDate *)date;
+ (NSDate *)dateFromSqliteString:(NSString *)text;
+ (NSString *)toString:(NSDate *)date;
+ (NSDate *)fromString:(NSString *)text;
+ (NSString *)toDateString:(NSDate *)date;
+ (NSString *)toUSEnglishString:(NSDate *)date;
+ (NSString *)toTimeString:(NSDate *)date;
+ (NSDate *)addMonth:(int)month toDate:(NSDate *)date;
+ (NSDate *)addDay:(int)day toDate:(NSDate *)date;
@end