commit | author | age
|
655e66
|
1 |
/* |
H |
2 |
* Copyright (C) 2017 Twitter, Inc. |
|
3 |
* |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
* |
|
16 |
*/ |
|
17 |
|
a0a843
|
18 |
#import <Foundation/Foundation.h> |
H |
19 |
|
|
20 |
@interface TWTRDateFormatters : NSObject |
|
21 |
|
|
22 |
/** |
|
23 |
* For use in parsing the Twitter API only. |
|
24 |
* |
|
25 |
* @return formatter that handles Twitter's API format. |
|
26 |
*/ |
|
27 |
+ (NSDateFormatter *)serverParsingDateFormatter; |
|
28 |
|
|
29 |
/** |
|
30 |
* For use in parsing the HTTP `date` header only |
|
31 |
* |
|
32 |
* @return formatter that handles HTTP `date` header format |
|
33 |
*/ |
|
34 |
+ (NSDateFormatter *)HTTPDateHeaderParsingFormatter; |
|
35 |
|
|
36 |
/** |
|
37 |
* For use in compact Tweet view when 24 hours < createdAt < current year. |
|
38 |
* |
|
39 |
* @return formatter that emits abbreviated month and day e.g. Aug 5. |
|
40 |
*/ |
|
41 |
+ (NSDateFormatter *)dayAndMonthDateFormatter; |
|
42 |
|
|
43 |
/** |
|
44 |
* For use in timestamp accessibility labels |
|
45 |
* |
|
46 |
* @return formatter with NSDateFormatterLongStyle e.g. November 23, 1937 |
|
47 |
*/ |
|
48 |
+ (NSDateFormatter *)systemLongDateFormatter; |
|
49 |
|
|
50 |
/** |
|
51 |
* For use in compact Tweet view when current year < createdAt. |
|
52 |
* |
|
53 |
* @return formatter that emits just the date without time e.g. MM/DD/YY |
|
54 |
*/ |
|
55 |
+ (NSDateFormatter *)shortHistoricalDateFormatter; |
|
56 |
|
|
57 |
@end |