main :: IO ()
main = do
Prelude.putStrLn "Please,enter date YYYY-MM-DD"
currentTime <- getCurrentTime
date <- Prelude.getLine
let sTime = show currentTime
let retrievedDate = toGregorian $ utctDay currentTime
let forecastDay = parseTimeM True defaultTimeLocale "%Y-%-m-%-d" date :: Maybe Day
let diifedDays = diffDays (fromJust forecastDay) retrievedDate
if date >= show retrievedDate && diifedDays > 0 && diifedDays <= 16
then print date
else print "Time Error!"
I need retrievedDate (Integer,Int,Int) conver to Day. The task is: subtract from (forecastDay - retrievedDay) But I can not do this, since I need retrievedDate convert to Day
Error Message: Couldn't match expected type ‘Day’ with actual type ‘(Integer, Int, Int)’
42 | let diifedDays = diffDays (fromJust forecastDay) retrievedDate