getDateInt :: Int -- ^ Integer input
           -> DateInt -- ^ packaged DateInt
getDateInt di = let (y, m, d) = dateComponentsFromInt di
                in if and [(di >= 19000101), (di <= 20991231), (m >= 1), (m <= 12), (d >= 1), (d <= maxInMonth m y)]
                   then CreateDateInt di
                   else error ("Invalid integer to create date:" ++ show di)
getDateInt :: Int -- ^ Integer input
           -> DateInt
getDateInt di = let (y, m, d) = dateComponentsFromInt di
                in if and [(di >= 19000101), (di <= 20991231), (m >= 1), (m <= 12), (d >= 1), (d <= maxInMonth m y)]
                   then CreateDateInt di
                   else error ("Invalid integer to create date:" ++ show di)
getDateInt di = let (y, m, d) = dateComponentsFromInt di
                in if and [(di >= 19000101), (di <= 20991231), (m >= 1), (m <= 12), (d >= 1), (d <= maxInMonth m y)]
                   then CreateDateInt di
                   else error ("Invalid integer to create date:" ++ show di)