From f485b30ae0d6b781122d999192b2d0a2276e3cef Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 1 Jun 2023 07:00:56 -1000 Subject: [PATCH] ;cln:close: fix end date doc --- hledger/Hledger/Cli/Commands/Close.hs | 8 +++----- hledger/Hledger/Cli/Commands/Close.md | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Close.hs b/hledger/Hledger/Cli/Commands/Close.hs index 29a611565..31160b96d 100644 --- a/hledger/Hledger/Cli/Commands/Close.hs +++ b/hledger/Hledger/Cli/Commands/Close.hs @@ -74,12 +74,10 @@ close copts@CliOpts{rawopts_=rawopts, reportspec_=rspec0} j = do ropts = (_rsReportOpts rspec0){balanceaccum_=Historical, accountlistmode_=ALFlat} rspec1 = setDefaultConversionOp NoConversionOp rspec0{_rsReportOpts=ropts} - -- dates of the closing and opening transactions - -- Close.md: + -- Dates of the closing and opening transactions. -- "The default closing date is yesterday, or the journal's end date, whichever is later. - -- You can change this by specifying a [report end date](#report-start--end-date), - -- where "last day of the report period" will be the closing date. - -- (Only the end date matters; a report start date will be ignored.) + -- You can change this by specifying a [report end date](#report-start--end-date) with `-e`. + -- The last day of the report period will be the closing date, eg `-e 2024` means "close on 2023-12-31". -- The opening date is always the day after the closing date." argsq = _rsQuery rspec1 yesterday = addDays (-1) $ _rsDay rspec1 diff --git a/hledger/Hledger/Cli/Commands/Close.md b/hledger/Hledger/Cli/Commands/Close.md index e8843ab26..ee6c03443 100644 --- a/hledger/Hledger/Cli/Commands/Close.md +++ b/hledger/Hledger/Cli/Commands/Close.md @@ -44,6 +44,7 @@ In all modes, the defaults can be overridden: - the transaction descriptions can be changed with `--close-desc=DESC` and `--open-desc=DESC` - the account to transfer to/from can be changed with `--close-acct=ACCT` and `--open-acct=ACCT` - the accounts to be closed/opened can be changed with `ACCTQUERY` (account query arguments). +- the closing/opening dates can be changed with `-e DATE` (a report end date) By default just one destination/source posting will be used, with its amount left implicit. With `--x/--explicit`, the amount will be shown explicitly, @@ -59,10 +60,8 @@ and destination postings next to each other. This could be useful for troubleshooting. The default closing date is yesterday, or the journal's end date, whichever is later. -You can change this by specifying a [report end date](#report-start--end-date); -(The report start date does not matter.) -The last day of the report period will be the closing date; -eg `-e 2022` means "close on 2022-12-31". +You can change this by specifying a [report end date](#report-start--end-date) with `-e`. +The last day of the report period will be the closing date, eg `-e 2024` means "close on 2023-12-31". The opening date is always the day after the closing date. ### close and balance assertions