#177: method to format dates
This commit is contained in:
parent
fe451963c2
commit
9e542fe382
2 changed files with 6 additions and 3 deletions
|
@ -21,6 +21,6 @@
|
|||
@interface DateUtilities : NSObject
|
||||
|
||||
+ (int)daysBetween:(NSDate*) dt1 and:(NSDate*) dt2;
|
||||
+ (NSString*) formatDatePhoto:(NSDate*) date;
|
||||
+ (NSString*) formatDate:(NSDate*) date;
|
||||
|
||||
@end
|
||||
|
|
|
@ -30,9 +30,12 @@
|
|||
return [components day]+1;
|
||||
}
|
||||
|
||||
+ (NSString *) formatDatePhoto:(NSDate *) date
|
||||
+ (NSString *) formatDate:(NSDate *) date
|
||||
{
|
||||
return nil;
|
||||
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
|
||||
[dateFormat setDateStyle:NSDateFormatterMediumStyle];
|
||||
[dateFormat setTimeStyle:NSDateFormatterShortStyle];
|
||||
return [dateFormat stringFromDate:date];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue