Skip to content
NSDate Category that tells you if a date falls on a holiday, during a holiday season, or on a weekend
Objective-C
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
NSDate+SAHolidays
SAHolidays.xcodeproj
SAHolidays
SAHolidaysTests
README.md

README.md

SAHolidays

SAHolidays is an NSDate Category that tells you if a date falls on a holiday, during a holiday season, or on a weekend. It's designed for developers wanting to easily determine if a date is a holiday in order to incorporate specific holday features.

The category includes the dates each holiday falls on for the next 7 years, until 2020, and can be easily customized to support further into the future.

Sample use:

NSLog(@"Is today a holiday: %u", [[NSDate date] isHoliday]);

The category includes 24 holidays including:

  • New Years Day
  • Martin Luther King Jr's Birthday
  • Groundhog Day
  • Valentine's Day
  • President's Day
  • St. Patrick's Day
  • April Fool's Day
  • Good Friday
  • Easter
  • Earth Day
  • Mother's Day
  • Memorial Day
  • Flag Day
  • Father's Day
  • Independence Day
  • Labor Day
  • Columbus Day
  • Halloween
  • Veteran's Day
  • Thanksgiving
  • Pearl Harbor Day
  • Christmas Eve
  • Christmas
  • Kwanzaa
  • New Years Eve

And 4 holiday seasons:

  • Easter Season
  • Halloween Season
  • Thanksgiving Season
  • Christmas Season
You can’t perform that action at this time.