session-ios/Signal/src/util/DateUtil.h
Rainer Killinger d12c5b308e Fixes #680
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”.
2015-04-01 09:35:04 +02:00

13 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