usa-holidays-0.1.0.1

Safe HaskellSafe
LanguageHaskell2010

Data.Holiday.USA

Synopsis

Documentation

data Holiday Source #

Holiday means a "real" holiday day like you may not go to work on that day. Like Mother's day isn't considered a holiday because it's on Sundays.

Constructors

Holiday Day String 
Instances
Eq Holiday Source # 
Instance details

Defined in Data.Holiday.USA

Methods

(==) :: Holiday -> Holiday -> Bool #

(/=) :: Holiday -> Holiday -> Bool #

Show Holiday Source # 
Instance details

Defined in Data.Holiday.USA

getHoliday :: Day -> Maybe Holiday Source #

Returns a Holiday if the given date is

Examples:

>>> let christmas = Time.fromGregorian 2019 12 25
>>> getHoliday christmas
Just (Holiday {holiday_day = 2019-12-25, holiday_name = "Christmas"})
>>> let noHoliday = Time.fromGregorian 2019 12 20
>>> getHoliday noHoliday
Nothing