hank
2018-06-21 2cfb267ecc1bea8bc564466a1620535018dce77c
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
18 /**
19  This header is private to the Twitter Core SDK and not exposed for public SDK consumption
20  */
a0a843 21
H 22 #import <Foundation/Foundation.h>
23
24 @interface TWTRDateFormatters : NSObject
25
26 /**
27  *  For use in parsing the Twitter API only.
28  *
29  *  @return formatter that handles Twitter's API format.
30  */
31 + (NSDateFormatter *)serverParsingDateFormatter;
32
33 /**
34  *  For use in parsing the HTTP `date` header only
35  *
36  *  @return formatter that handles HTTP `date` header format
37  */
38 + (NSDateFormatter *)HTTPDateHeaderParsingFormatter;
39
40 /**
41  *  For use in compact Tweet view when 24 hours < createdAt < current year.
42  *
43  *  @return formatter that emits abbreviated month and day e.g. Aug 5.
44  */
45 + (NSDateFormatter *)dayAndMonthDateFormatter;
46
47 /**
48  *  For use in timestamp accessibility labels
49  *
50  *  @return formatter with NSDateFormatterLongStyle e.g. November 23, 1937
51  */
52 + (NSDateFormatter *)systemLongDateFormatter;
53
54 /**
55  *  For use in compact Tweet view when current year < createdAt.
56  *
57  *  @return formatter that emits just the date without time e.g. MM/DD/YY
58  */
59 + (NSDateFormatter *)shortHistoricalDateFormatter;
60
61 @end