bank-holiday-usa: US bank holidays

[ library, mit, time ] [ Propose Tags ]

A library for determining US bank holidays


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1, 0.1.0, 0.1.1, 0.2.0
Dependencies base (>=4 && <5), time [details]
License MIT
Copyright 2015 brady.ouren <brady.ouren@gmail.com>
Author brady.ouren <brady.ouren@gmail.com>
Maintainer brady.ouren <brady.ouren@gmail.com>
Category Time
Home page https://github.com/tippenein/BankHoliday
Bug tracker https://github.com/tippenein/BankHoliday/issues
Source repo head: git clone git://github.com/tippenein/BankHoliday.git
Uploaded by tippenein at 2021-11-11T22:18:54Z
Distributions NixOS:0.2.0
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2156 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-11-11 [all 1 reports]

Readme for bank-holiday-usa-0.2.0

[back to package description]

Bank Holiday USA

Build Status Hackage

A haskell library for holidays

bank-holiday-usa on hackage


usage

-- 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]

# 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 library