Skip to content

feat: allow dashes in begin and end dates #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2023
Merged

Conversation

jrick
Copy link
Contributor

@jrick jrick commented Aug 29, 2023

This time format was already allowed for entries in the ledger data file, and it was odd to hit time parse errors for dates written in the same format with the -b/--begin-date and -e/--end-date flags.

@howeyc
Copy link
Owner

howeyc commented Aug 29, 2023

This is nice, but I'm wondering if it would be worthwhile to support many date formats, like in the ledger file parser. Like this:

ledger/parse.go

Line 194 in ffdee7b

transDate, lp.dateLayout, err = date.ParseAndGetLayout(dateString)

Other date formats were already allowed for entries in the ledger data file,
and it was odd to hit time parse errors for dates written in these other
formats with the -b/--begin-date and -e/--end-date flags.
@howeyc
Copy link
Owner

howeyc commented Aug 29, 2023

LGTM

@howeyc howeyc merged commit bae70bb into howeyc:master Aug 29, 2023
@jrick jrick deleted the dash-dates branch August 29, 2023 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants