Skip to content

Commit

Permalink
fix: default end date far into the future
Browse files Browse the repository at this point in the history
  • Loading branch information
howeyc committed Oct 12, 2023
1 parent b2f2cd6 commit dd12d8e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ledger/cmd/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func init() {

var startDate, endDate time.Time
startDate = time.Date(1970, 1, 1, 0, 0, 0, 0, time.Local)
endDate = time.Now().Add(time.Hour * 24)
endDate = time.Now().Add(1<<63 - 1)
exportCmd.Flags().StringVarP(&startString, "begin-date", "b", startDate.Format(transactionDateFormat), "Begin date of transaction processing.")
exportCmd.Flags().StringVarP(&endString, "end-date", "e", endDate.Format(transactionDateFormat), "End date of transaction processing.")
exportCmd.Flags().StringVar(&payeeFilter, "payee", "", "Filter output to payees that contain this string.")
Expand Down
2 changes: 1 addition & 1 deletion ledger/cmd/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func init() {

var startDate, endDate time.Time
startDate = time.Date(1970, 1, 1, 0, 0, 0, 0, time.Local)
endDate = time.Now().Add(time.Hour * 24)
endDate = time.Now().Add(1<<63 - 1)
printCmd.Flags().StringVarP(&startString, "begin-date", "b", startDate.Format(transactionDateFormat), "Begin date of transaction processing.")
printCmd.Flags().StringVarP(&endString, "end-date", "e", endDate.Format(transactionDateFormat), "End date of transaction processing.")
printCmd.Flags().StringVar(&payeeFilter, "payee", "", "Filter output to payees that contain this string.")
Expand Down
2 changes: 1 addition & 1 deletion ledger/cmd/printAccounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func init() {

var startDate, endDate time.Time
startDate = time.Date(1970, 1, 1, 0, 0, 0, 0, time.Local)
endDate = time.Now()
endDate = time.Now().Add(1<<63 - 1)
accountsCmd.Flags().StringVarP(&startString, "begin-date", "b", startDate.Format(transactionDateFormat), "Begin date of transaction processing.")
accountsCmd.Flags().StringVarP(&endString, "end-date", "e", endDate.Format(transactionDateFormat), "End date of transaction processing.")
accountsCmd.Flags().BoolVarP(&accountLeavesOnly, "leaves-only", "l", false, "Only show most-depth accounts")
Expand Down
2 changes: 1 addition & 1 deletion ledger/cmd/printBalance.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func init() {

var startDate, endDate time.Time
startDate = time.Date(1970, 1, 1, 0, 0, 0, 0, time.Local)
endDate = time.Now()
endDate = time.Now().Add(1<<63 - 1)
balanceCmd.Flags().StringVarP(&startString, "begin-date", "b", startDate.Format(transactionDateFormat), "Begin date of transaction processing.")
balanceCmd.Flags().StringVarP(&endString, "end-date", "e", endDate.Format(transactionDateFormat), "End date of transaction processing.")
balanceCmd.Flags().StringVar(&payeeFilter, "payee", "", "Filter output to payees that contain this string.")
Expand Down
2 changes: 1 addition & 1 deletion ledger/cmd/printEquity.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func init() {

var startDate, endDate time.Time
startDate = time.Date(1970, 1, 1, 0, 0, 0, 0, time.Local)
endDate = time.Now()
endDate = time.Now().Add(1<<63 - 1)
equityCmd.Flags().StringVarP(&startString, "begin-date", "b", startDate.Format(transactionDateFormat), "Begin date of transaction processing.")
equityCmd.Flags().StringVarP(&endString, "end-date", "e", endDate.Format(transactionDateFormat), "End date of transaction processing.")
}
2 changes: 1 addition & 1 deletion ledger/cmd/printRegister.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func init() {

var startDate, endDate time.Time
startDate = time.Date(1970, 1, 1, 0, 0, 0, 0, time.Local)
endDate = time.Now().Add(time.Hour * 24)
endDate = time.Now().Add(1<<63 - 1)
registerCmd.Flags().StringVarP(&startString, "begin-date", "b", startDate.Format(transactionDateFormat), "Begin date of transaction processing.")
registerCmd.Flags().StringVarP(&endString, "end-date", "e", endDate.Format(transactionDateFormat), "End date of transaction processing.")
registerCmd.Flags().StringVar(&payeeFilter, "payee", "", "Filter output to payees that contain this string.")
Expand Down

0 comments on commit dd12d8e

Please sign in to comment.