mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
d12c5b308e
Hour format was set to static “h:mm a” leading to localization issues. Current locale will now be respected in every formatting. Adjusted the decision when to label the message with a date from “more then 24 hours ago” to “not today”.
12 lines
313 B
Objective-C
12 lines
313 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
@interface DateUtil : NSObject
|
|
|
|
+ (NSDateFormatter *)dateFormatter;
|
|
+ (NSDateFormatter *)weekdayFormatter;
|
|
+ (NSDateFormatter *)timeFormatter;
|
|
+ (BOOL)dateIsOlderThanOneDay:(NSDate *)date;
|
|
+ (BOOL)dateIsOlderThanOneWeek:(NSDate *)date;
|
|
+ (BOOL)dateIsToday:(NSDate *)date;
|
|
|
|
@end
|