Commit 7516792b authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] removing debug message

parent 5ef12110
...@@ -77,12 +77,12 @@ parse lang s = do ...@@ -77,12 +77,12 @@ parse lang s = do
--printDebug "Date: " s --printDebug "Date: " s
dateStr' <- pure $ dateFlow (DucklingFailure s) -- parseRawSafe lang s dateStr' <- pure $ dateFlow (DucklingFailure s) -- parseRawSafe lang s
--printDebug "Date': " dateStr' --printDebug "Date': " dateStr'
case dateFlow dateStr' of case (dateFlow dateStr') of
DateFlowSuccess ok -> pure ok DateFlowSuccess ok -> pure ok
_ -> withDebugMode (DebugMode True) DateFlowFailure -> (withDebugMode (DebugMode True)
"[G.C.T.P.T.Date parse]" (lang,s) "[G.C.T.P.T.Date parse]" (lang,s)
$ getCurrentTime $ getCurrentTime)
_ -> panic "[G.C.T.C.Parsers.Date] parse: Should not happen"
defaultDate :: Text defaultDate :: Text
defaultDate = "0-0-0T0:0:0" defaultDate = "0-0-0T0:0:0"
...@@ -125,15 +125,6 @@ readDate txt = do ...@@ -125,15 +125,6 @@ readDate txt = do
let format = cs $ iso8601DateFormat Nothing let format = cs $ iso8601DateFormat Nothing
parseTimeM True defaultTimeLocale (unpack format) (cs txt) parseTimeM True defaultTimeLocale (unpack format) (cs txt)
readDate' :: Text -> Maybe UTCTime
readDate' txt = do
--let format = cs $ iso8601DateFormat (Just "%F %H:%M:%S")
--let format = cs $ iso8601DateFormat Nothing
let format = cs $ iso8601DateFormat (Just "%0Y")
parseTimeM True defaultTimeLocale (unpack format) (cs txt)
-- TODO add Paris at Duckling.Locale Region datatype -- TODO add Paris at Duckling.Locale Region datatype
-- | To get Homogeinity of the languages -- | To get Homogeinity of the languages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment