зеркало из https://github.com/nextcloud/talk-ios.git
Add getTimeFromDate to NCUtils
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Родитель
95946ae6dc
Коммит
568e7757c9
|
@ -38,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
+ (NSDate *)dateFromDateAtomFormat:(NSString *)dateAtomFormatString;
|
||||
+ (NSString *)dateAtomFormatFromDate:(NSDate *)date;
|
||||
+ (NSString *)readableDateFromDate:(NSDate *)date;
|
||||
+ (NSString *)getTimeFromDate:(NSDate *)date;
|
||||
|
||||
+ (NSString *)sha1FromString:(NSString *)string;
|
||||
|
||||
|
|
|
@ -131,6 +131,13 @@ static NSString *const nextcloudScheme = @"nextcloud:";
|
|||
return [dateFormatter stringFromDate:date];
|
||||
}
|
||||
|
||||
+ (NSString *)getTimeFromDate:(NSDate *)date
|
||||
{
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
[formatter setDateFormat:@"HH:mm"];
|
||||
return [formatter stringFromDate:date];
|
||||
}
|
||||
|
||||
+ (NSString *)sha1FromString:(NSString *)string
|
||||
{
|
||||
NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
|
Загрузка…
Ссылка в новой задаче