isWorkday or isWeekend
SlavaBushtruk opened this issue · comments
Slava Bushtruk commented
Would be nice. Thanks
Erica Sadun commented
- (BOOL) isTypicallyWeekend
{
NSDateComponents *components = [CURRENT_CALENDAR components:NSYearCalendarUnit fromDate:self];
if ((components.weekday == 1) ||
(components.weekday == 7))
return YES;
return NO;
} - (BOOL) isTypicallyWorkday
{
return ![self isTypicallyWeekend];
}
-- E, totally not looking up calendars and holidays and bank mondays
Grep foo whilst ye may oh daemons of the spring
On May 4, 2012, at 3:42 AM, Slava Bushtruk reply@reply.github.com wrote:
Would be nice. Thanks
Reply to this email directly or view it on GitHub:
#12
Erica Sadun commented
Added
Nicolas Pabion commented
Just a slight problem with the components for isTypicallyWeekend: should be NSWeekdayCalendarUnit otherwise it will always return NO.