objective c - Going from numerical month to Gregorian name for month -


currently i'm using following code acquire date date picker. right now, when nslog nsdatecomponents var, numberical representation month (i.e. 7 july). how can print out month name, day of week, saturday?

   nsdate *selecteddate = _datepicker.date;      nsdateformatter *df = [[nsdateformatter alloc] init];      [df setdateformat:@"mm:dd:hh:mm"];      nsdatecomponents *components = [[nscalendar currentcalendar] components:nsdaycalendarunit | nsmonthcalendarunit | nsyearcalendarunit fromdate:_datepicker.date];      nslog(@"components: %@",components); 

use format strings eeee day of week, , mmmm month of year in nsdateformatter.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -