forked from TelegramMessenger/Telegram-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTGDateUtils.h
29 lines (23 loc) · 910 Bytes
/
TGDateUtils.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
#import <Foundation/Foundation.h>
#import "TGChatTimestamp.h"
typedef enum
{
TGDateRelativeSpanLately = -2,
TGDateRelativeSpanWithinAWeek = -3,
TGDateRelativeSpanWithinAMonth = -4,
TGDateRelativeSpanALongTimeAgo = -5
} TGDateRelativeSpan;
@interface TGDateUtils : NSObject
+ (void)reset;
+ (NSString *)stringForFullDate:(int)date;
+ (NSString *)stringForShortTime:(int)time;
+ (NSString *)stringForShortTime:(int)time daytimeVariant:(int *)daytimeVariant;
+ (NSString *)stringForDialogTime:(int)time;
+ (NSString *)stringForDayOfWeek:(int)date;
+ (NSString *)stringForMonthOfYear:(int)date;
+ (NSString *)stringForPreciseDate:(int)date;
+ (NSString *)stringForApproximateDate:(int)date;
+ (NSString *)stringForRelativeLastSeen:(int)date;
+ (NSString *)stringForMessageListDate:(int)date;
+ (TGChatTimestamp *)timestampForDateIfNeeded:(int)date previousDate:(NSNumber *)previousDate;
@end