commit | author | age
|
a0a843
|
1 |
// |
H |
2 |
// TWTRDateFormatters.h |
|
3 |
// |
|
4 |
// Created by Steven Hepting on 7/21/14. |
|
5 |
// Copyright (c) 2014 Twitter. All rights reserved. |
|
6 |
// |
|
7 |
|
|
8 |
#import <Foundation/Foundation.h> |
|
9 |
|
|
10 |
@interface TWTRDateFormatters : NSObject |
|
11 |
|
|
12 |
/** |
|
13 |
* For use in parsing the Twitter API only. |
|
14 |
* |
|
15 |
* @return formatter that handles Twitter's API format. |
|
16 |
*/ |
|
17 |
+ (NSDateFormatter *)serverParsingDateFormatter; |
|
18 |
|
|
19 |
/** |
|
20 |
* For use in parsing the HTTP `date` header only |
|
21 |
* |
|
22 |
* @return formatter that handles HTTP `date` header format |
|
23 |
*/ |
|
24 |
+ (NSDateFormatter *)HTTPDateHeaderParsingFormatter; |
|
25 |
|
|
26 |
/** |
|
27 |
* For use in compact Tweet view when 24 hours < createdAt < current year. |
|
28 |
* |
|
29 |
* @return formatter that emits abbreviated month and day e.g. Aug 5. |
|
30 |
*/ |
|
31 |
+ (NSDateFormatter *)dayAndMonthDateFormatter; |
|
32 |
|
|
33 |
/** |
|
34 |
* For use in timestamp accessibility labels |
|
35 |
* |
|
36 |
* @return formatter with NSDateFormatterLongStyle e.g. November 23, 1937 |
|
37 |
*/ |
|
38 |
+ (NSDateFormatter *)systemLongDateFormatter; |
|
39 |
|
|
40 |
/** |
|
41 |
* For use in compact Tweet view when current year < createdAt. |
|
42 |
* |
|
43 |
* @return formatter that emits just the date without time e.g. MM/DD/YY |
|
44 |
*/ |
|
45 |
+ (NSDateFormatter *)shortHistoricalDateFormatter; |
|
46 |
|
|
47 |
@end |