Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
3
Task/Date-format/Objective-C/date-format-1.m
Normal file
3
Task/Date-format/Objective-C/date-format-1.m
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
NSLog(@"%@", [NSDate date]);
|
||||
NSLog(@"%@", [[NSDate date] descriptionWithCalendarFormat:@"%Y-%m-%d" timeZone:nil locale:nil]);
|
||||
NSLog(@"%@", [[NSDate date] descriptionWithCalendarFormat:@"%A, %B %d, %Y" timeZone:nil locale:nil]);
|
||||
6
Task/Date-format/Objective-C/date-format-2.m
Normal file
6
Task/Date-format/Objective-C/date-format-2.m
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
NSLog(@"%@", [NSDate date]);
|
||||
NSDateFormatter *dateFormatter = [[NSDateFormat alloc] init];
|
||||
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
|
||||
NSLog(@"%@", [dateFormatter stringFromDate:[NSDate date]]);
|
||||
[dateFormatter setDateFormat:@"EEEE, MMMM d, yyyy"];
|
||||
NSLog(@"%@", [dateFormatter stringFromDate:[NSDate date]]);
|
||||
Loading…
Add table
Add a link
Reference in a new issue