-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
allow other date formats in journal via --input-date-format #210
Comments
I'd say if you would live in the country where dd.mm.yyyy. is used everywhere, the answer to above is quite simple. ;) |
I grew up in such a country, but I've still always favoured the unambiguous sortable international-standard YYYY-MM-DD order for computing. But I note your plus vote. :) |
I think it would be good to support showing different data formats in the UI, but the data stored on disk should be in one format only. I don't see the advantage in allowing different date formats in the Journal File when there is a command line UI to interact with the data and the data can be presented differently there. I agree with all of the disadvantages you mentioned though. |
|
I think YYYY-MM-DD is "ISO style", rather than YYYY/MM/DD. |
I’m confused by the
In all cases I think the plaintext files should only allow true ISO dates. |
This may be a separate issue, but as @hpdeifel notes in hpdeifel/hledger-iadd#14 (comment), the |
A new issue should be opened, proposing and exploring how to make hledger tools and docs use the ISO date format by default (rather than the Y/M/D one I chose for historical reasons). |
Specially for |
I think the journal file itself should have an unambigious spec and no localized versions for dates (except the few accepted formats @simonmichael mentioned in the first post).
What I miss, is @varac my hledger version 1.12.1 does support ISO format on |
It seems like there is some consensus that just ISO dates (or ISO plus a few punctuation variations, as we have now) is sufficient, and preferable, in journal files. Then what about..
Output:
Docs:
|
@schoettl Actually ISO8601 is the main date format in Germany (https://de.wikipedia.org/wiki/ISO_8601#Zusammenfassung), and DD.MM.YYYY is only a tolerated date format. So instead of supporting their bad habits, you should educate them about ISO8601 😉. |
So I think we are rejecting the --input-date-format idea for now; our journal, timedot, and timeclock formats, and all UIs, already support ISO dates; so what's needed is to change docs, and the various tools' output; and this issue can be closed in favour of #933. |
Journal entry dates currently have to be in ISO-style YYYY/MM/DD format (or YYYY-MM-DD or YYYY.MM.DD or MM/DD or MM-DD or MM.DD). If we provided a Ledger-style --input-date-format option, folks could use that to write DD/MM/YYYY (and DD/MM) dates instead, without ambiguity. We already have this kind of support when parsing CSV files.
Localisation is good. On the downside this makes sharing journal files and snippets harder, and creates one more hurdle for newcomers to get right. I've had to remember and adjust --input-date-format multiple times when running ledger on some pasted sample. So is this really worth it ?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: