-- | Converts days into numbers, returns a tuple of the rest of the string (the times)
-- and a list of number representations of days
convertTime :: (T.Text, [Double]) -> (T.Text, [Double])
convertTime (str, times)
   |T.null str = ("", times)
   |T.head str == 'M' = convertTime (T.drop 1 str, 0:times)
   |T.head str == 'T' = convertTime (T.drop 1 str, 1:times)
   |T.head str == 'W' = convertTime (T.drop 1 str, 2:times)
   |T.head str == 'R' = convertTime (T.drop 1 str, 3:times)
   |T.head str == 'F' = convertTime (T.drop 1 str, 4:times)
   |otherwise = (str, times)
convertTime :: (T.Text, [Double]) -> (T.Text, [Double])
convertTime (str, times)
   |T.null str = ("", times)
   |T.head str == 'M' = convertTime (T.drop 1 str, 0:times)
   |T.head str == 'T' = convertTime (T.drop 1 str, 1:times)
   |T.head str == 'W' = convertTime (T.drop 1 str, 2:times)
   |T.head str == 'R' = convertTime (T.drop 1 str, 3:times)
   |T.head str == 'F' = convertTime (T.drop 1 str, 4:times)
   |otherwise = (str, times)
convertTime (str, times)
   |T.null str = ("", times)
   |T.head str == 'M' = convertTime (T.drop 1 str, 0:times)
   |T.head str == 'T' = convertTime (T.drop 1 str, 1:times)
   |T.head str == 'W' = convertTime (T.drop 1 str, 2:times)
   |T.head str == 'R' = convertTime (T.drop 1 str, 3:times)
   |T.head str == 'F' = convertTime (T.drop 1 str, 4:times)
   |otherwise = (str, times)