bank-holidays-england-0.1.0.1: Calculation of bank holidays in England and Wales, including special cases 1995-2014.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Time.Calendar.BankHoliday.EnglandAndWales

Description

Reasonably efficient (constant-time) calculation of standard bank holidays in England and Wales, including special cases 1995-2014. May become out-of-date as future special cases are announced.

Synopsis

Documentation

bankHolidays :: Integer -> [Day] Source

List the bank holidays for the given year, in ascending order. Bank holidays never fall on a weekend.

isBankHoliday :: Day -> Bool Source

Returns whether a day is a bank holiday.

countBankHolidays :: Day -> Day -> Integer Source

Count the number of bank holidays between two Days.

If d0 <= d1 then countBankHolidays d0 d1 is the number of Days d for which isBankHoliday d && d0 <= d && d < d1. Note the count includes d0 but excludes d1.

Additionally, countBankHolidays d0 d1 == negate (countBankHolidays d1 d0) and countBankHolidays d0 d2 == countBankHolidays d0 d1 + countBankHolidays d1 d2.