-- | Converts the textual representation of time into numbers
toDouble :: T.Text -> Double
toDouble double
    | null list = 0.0
    | otherwise = fst (head list) + halfHour
    where
        splitIt = T.split (== ':') double
        list = reads $ T.unpack (head splitIt)
        halfHour = if length splitIt > 1
                   then 0.5
                   else 0

-- | Zips together time slots with their days
toDouble :: T.Text -> Double
toDouble double
    | null list = 0.0
    | otherwise = fst (head list) + halfHour
    where
        splitIt = T.split (== ':') double
        list = reads $ T.unpack (head splitIt)
        halfHour = if length splitIt > 1
                   then 0.5
                   else 0

-- | Zips together time slots with their days
toDouble double
    | null list = 0.0
    | otherwise = fst (head list) + halfHour
    where
        splitIt = T.split (== ':') double
        list = reads $ T.unpack (head splitIt)
        halfHour = if length splitIt > 1
                   then 0.5
                   else 0

-- | Zips together time slots with their days