2015-10-01 18:19:52 +02:00
|
|
|
#import <Foundation/Foundation.h>
|
2016-02-25 01:03:51 +01:00
|
|
|
#import "TGChatTimestamp.h"
|
2015-10-01 18:19:52 +02:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
TGDateRelativeSpanLately = -2,
|
|
|
|
TGDateRelativeSpanWithinAWeek = -3,
|
|
|
|
TGDateRelativeSpanWithinAMonth = -4,
|
|
|
|
TGDateRelativeSpanALongTimeAgo = -5
|
|
|
|
} TGDateRelativeSpan;
|
|
|
|
|
|
|
|
@interface TGDateUtils : NSObject
|
|
|
|
|
2016-02-25 01:03:51 +01:00
|
|
|
+ (void)reset;
|
|
|
|
|
2015-10-01 18:19:52 +02:00
|
|
|
+ (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 *)stringForMessageListDate:(int)date;
|
|
|
|
+ (NSString *)stringForLastSeen:(int)date;
|
|
|
|
+ (NSString *)stringForApproximateDate:(int)date;
|
|
|
|
+ (NSString *)stringForRelativeLastSeen:(int)date;
|
|
|
|
|
2016-02-25 01:03:51 +01:00
|
|
|
+ (TGChatTimestamp *)timestampForDateIfNeeded:(int)date previousDate:(NSNumber *)previousDate;
|
|
|
|
|
2015-10-01 18:19:52 +02:00
|
|
|
@end
|