ios - Enumeration missing from Cocoa Touch Calendaring classes? -
after few hours of working nscalendar
, nsdate
, nsdatecomponents
, occurred me apple did not create enumeration weekdays.
apparently, judging framework, world using 7 days in week approach week days..and week days have names universal in meaning i.e. translated sunday example hungarian different word (vasarnap) means sunday. speak hungarian + 4 other languages besides english know sure.
if extract nscalendarunitweekday
component, can find out returns nsinteger
, , sunday represented 1, monday 2, etc..
it easy extend nscalendar
provide such enumeration , did , far turns out practical. wondering perhaps missing , there reason omitting such enumeration.
is there?
there not. seem strange reason can think of not including enum due localization, "meaning" of 1, 2, 3, etc change , defining enum gregorian calendar, lead implied assumption sunday=1 only correct calendars.
Comments
Post a Comment