Skip to content

Commit

Permalink
Clearly state which format is acceptable for the--after and `--befo…
Browse files Browse the repository at this point in the history
…re` arguments.

In the case of these arguments, we accept ISO 8601 format strings, either in
basic format or extended format.
  • Loading branch information
jonathanknowles committed Jul 22, 2019
1 parent 940d516 commit 38c0bf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/cli/src/Cardano/CLI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -724,15 +724,15 @@ 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]
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)]
Expand Down
6 changes: 4 additions & 2 deletions lib/cli/test/unit/Cardano/CLISpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 38c0bf7

Please sign in to comment.