Utils.purs 389 B

1234567891011121314
  1. module Test.Utils where
  2. import Prelude
  3. import Data.Date (Month)
  4. import Data.Int (toNumber)
  5. import Data.Maybe (fromJust)
  6. import LinkedIn.UIElements.Parser (toYear)
  7. import LinkedIn.UIElements.Types (MonthYear(..))
  8. import Partial.Unsafe (unsafePartial)
  9. toMonthYear' :: Month -> Int -> MonthYear
  10. toMonthYear' m y = MonthYear m y' where
  11. y' = unsafePartial $ fromJust $ toYear $ toNumber y