Skip to content

Instantly share code, notes, and snippets.

@lxcid
Created January 17, 2012 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lxcid/1624084 to your computer and use it in GitHub Desktop.
Save lxcid/1624084 to your computer and use it in GitHub Desktop.
LXOperatingHours
#import <Foundation/Foundation.h>
enum {
LXMonday = 1 << 0,
LXTuesday = 1 << 1,
LXWednesday = 1 << 2,
LXThursday = 1 << 3,
LXFriday = 1 << 4,
LXSaturday = 1 << 5,
LXSunday = 1 << 6,
};
typedef NSUInteger LXDaysOfTheWeekMask;
@interface LXOperatingHours : NSObject
@property (assign, nonatomic) LXDaysOfTheWeekMask daysOfTheWeek;
@property (strong, nonatomic) NSTimeZone *timeZone;
@property (assign, nonatomic) NSUInteger startTime;
@property (assign, nonatomic) NSUInteger endTime;
@property (assign, nonatomic) BOOL ignorePublicHolidays;
@end
@lxcid
Copy link
Author

lxcid commented Jan 17, 2012

I want to describe a class structure that can effectively model operating hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment