From 38c0bf784d764c0961f31d31cb72a4825c5495ab Mon Sep 17 00:00:00 2001 From: Jonathan Knowles Date: Mon, 22 Jul 2019 07:44:30 +0000 Subject: [PATCH] Clearly state which format is acceptable for the`--after` and `--before` arguments. In the case of these arguments, we accept ISO 8601 format strings, either in basic format or extended format. --- lib/cli/src/Cardano/CLI.hs | 4 ++-- lib/cli/test/unit/Cardano/CLISpec.hs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/cli/src/Cardano/CLI.hs b/lib/cli/src/Cardano/CLI.hs index b3acaf737ca..eb81867a2f4 100644 --- a/lib/cli/src/Cardano/CLI.hs +++ b/lib/cli/src/Cardano/CLI.hs @@ -724,7 +724,7 @@ timeAfterOption :: Parser Iso8601Time timeAfterOption = optionT $ mempty <> long "after" <> metavar "TIME" - <> help "specifies an earliest time" + <> help "specifies an earliest time (ISO 8601 format: basic or extended)" <> showDefaultWith showT -- | [--before=TIME] @@ -732,7 +732,7 @@ timeBeforeOption :: Parser Iso8601Time timeBeforeOption = optionT $ mempty <> long "before" <> metavar "TIME" - <> help "specifies a latest time" + <> help "specifies a latest time (ISO 8601 format: basic or extended)" <> showDefaultWith showT -- | [(--quiet|--verbose)] diff --git a/lib/cli/test/unit/Cardano/CLISpec.hs b/lib/cli/test/unit/Cardano/CLISpec.hs index d345d0df3b9..e247e6219b4 100644 --- a/lib/cli/test/unit/Cardano/CLISpec.hs +++ b/lib/cli/test/unit/Cardano/CLISpec.hs @@ -254,8 +254,10 @@ spec = do , " -h,--help Show this help text" , " --port INT port used for serving the wallet" , " API. (default: 8090)" - , " --after TIME specifies an earliest time" - , " --before TIME specifies a latest time" + , " --after TIME specifies an earliest time (ISO 8601" + , " format: basic or extended)" + , " --before TIME specifies a latest time (ISO 8601" + , " format: basic or extended)" ] ["address", "--help"] `shouldShowUsage`