In my app I want to let user set display style of a date. I've considered to just modify unitFlags
to achieve that. I mean this
NSUInteger unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSWeekCalendarUnit | NSDayCalendarUnit;
But here's the question: How can I add or remove a NSCalendarUnit
to this integer?
I'm using NSCalendar
to get NSDateComponents
from a date.
Sorry if the question is too stupid, I wasn't working enough with bitwise operations :(