packages feed

usa-holidays 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+10/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

src/Data/Holiday/USA.hs view
@@ -34,6 +34,7 @@   | isNewYearsEve d = Just (Holiday d "New Year's Eve")   | isMemorialDay d = Just (Holiday d "Memorial Day")   | isLaborDay d = Just (Holiday d "Labor Day")+  | isMartinLutherKingJrDay d = Just (Holiday d "Martin Luther King Jr. Day")   | otherwise = Nothing   where     isChristmas :: Time.Day -> Bool@@ -58,8 +59,10 @@     isLaborDay _d =       let (_, month, day) = Time.toGregorian _d        in month == 9 && 1 <= day && day <= 7 && getDayOfWeek _d == Monday--+    isMartinLutherKingJrDay :: Time.Day -> Bool+    isMartinLutherKingJrDay _d =+      let (_, month, day) = Time.toGregorian _d+       in month == 1 && 15 <= day && day <= 21 && getDayOfWeek _d == Monday  data DayOfWeek   = Monday
test/Data/Holiday/USASpec.hs view
@@ -26,3 +26,6 @@   it "returns Labor Day on 2019/9/2" $ do     let laborDay = Time.fromGregorian 2019 9 2     USA.getHoliday laborDay `shouldBe` Just (USA.Holiday laborDay "Labor Day")+  it "returns Martin Luther King Jr. Day on 2020/1/20" $ do+    let day = Time.fromGregorian 2020 1 20+    USA.getHoliday day `shouldBe` Just (USA.Holiday day "Martin Luther King Jr. Day")
usa-holidays.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 7db2da728b7a69a235cb8b1f690aff1dfc4598c4c3f51fc817191124ae72b2a7+-- hash: 5bb7427026696acbfb615ed86ae222326353857f8285bed4a0109e6a9196046d  name:           usa-holidays-version:        0.1.0.1+version:        0.1.0.2 description:    Please see the README on GitHub at <https://github.com/kkweon/usa-holidays#readme> homepage:       https://github.com/kkweon/usa-holidays#readme bug-reports:    https://github.com/kkweon/usa-holidays/issues