https://github.com/tippenein/bankholiday
A library for U.S. bank holidays
https://github.com/tippenein/bankholiday
bank date holidays time
Last synced: 5 months ago
JSON representation
A library for U.S. bank holidays
- Host: GitHub
- URL: https://github.com/tippenein/bankholiday
- Owner: tippenein
- License: mit
- Created: 2015-09-10T14:02:03.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-11-11T22:18:39.000Z (about 4 years ago)
- Last Synced: 2025-05-25T16:08:25.061Z (6 months ago)
- Topics: bank, date, holidays, time
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/bank-holiday-usa
- Size: 37.1 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Bank Holiday USA
---
[](http://travis-ci.org/tippenein/BankHoliday)
[](http://hackage.haskell.org/package/bank-holiday-usa)
A haskell library for holidays
[bank-holiday-usa on hackage](https://hackage.haskell.org/package/bank-holiday-usa)
----
## usage
```haskell
-- list the 2016 bank holidays
bankHolidays 2016
[2016-01-18,2016-02-15,2016-05-30,2016-09-05,2016-10-10,2016-11-24,2016-01-01,2016-07-04,2016-11-11,2016-12-26]
-- isBankHoliday :: Day -> Bool
filter isBankHoliday [fromGregorian 2012 2 2, fromGregorian 2016 1 1]
[2016-01-01]
-- United States bank holidays started in 1933 on march 9th
holidaysBetweenYears 1900 1933
[1933-05-29,1933-09-04,1933-10-09,1933-11-23,1933-07-04,1933-12-25]
holidaysBetweenYears :: Day -> Day -> [Day]
```
``` sh
# Configure & build the package.
stack build
# Test package.
stack test
```
## Holidays
The holiday's covered:
- New Year's Day - January 1
- Martin Luther King, Jr. Day - Third Monday in January
- George Washington's Birthday (President's day) - Third Monday in February
- Memorial Day - Last Monday in May
- Independence Day - July 4
- Labor Day - First Monday in September
- Columbus Day - Second Monday in October
- Veterans Day - November 11
- Thanksgiving Day - 4th Thursday in November
- Christmas Day - December 25
> For holidays falling on Saturday, Federal Reserve Banks and Branches will be
open the preceding Friday. For holidays falling on Sunday, all Federal
Reserve Banks and Branches will be closed the following Monday.
Inspired by [this](https://hackage.haskell.org/package/bank-holidays-england) library