Skip to content
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

Use ISO 8601 date format for ledger export #393

Closed
blais opened this issue May 5, 2019 · 13 comments
Closed

Use ISO 8601 date format for ledger export #393

blais opened this issue May 5, 2019 · 13 comments
Labels
P2 Low priority, addressing would result in useful improvements reports Component: Canned reports

Comments

@blais
Copy link
Member

blais commented May 5, 2019

Original report by Alen Šiljak (Bitbucket: Alen Siljak, GitHub: MisterY).


Since ledger supports ISO date format, perhaps changing the default date format to ISO would be convenient? Help push the standardization. :slight_smile:

Ash a workaround, is there a way to customize the date format for bean-report ledgeroutput?

@blais
Copy link
Member Author

blais commented May 5, 2019

Original comment by Alen Šiljak (Bitbucket: Alen Siljak, GitHub: MisterY).


merged

@blais blais closed this as completed May 5, 2019
@blais
Copy link
Member Author

blais commented May 5, 2019

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


This patch broke the tests. Can you fix the tests? Thank you.

@blais
Copy link
Member Author

blais commented May 5, 2019

Original comment by Alen Šiljak (Bitbucket: Alen Siljak, GitHub: MisterY).


What is the best way to run the whole suite locally?

@blais
Copy link
Member Author

blais commented May 5, 2019

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


make test, which runs pytest

You may want to install pylint and run that too

make lint

@blais
Copy link
Member Author

blais commented May 5, 2019

Original comment by Alen Šiljak (Bitbucket: Alen Siljak, GitHub: MisterY).


Thanks. I'll try it out next time.

I’m using pylint already as it is integrated in vs code. Pytest I’m used to run manually.

@blais
Copy link
Member Author

blais commented May 5, 2019

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


you can do that

python3 -m pytest beancount

@blais
Copy link
Member Author

blais commented May 6, 2019

Original comment by Alen Šiljak (Bitbucket: Alen Siljak, GitHub: MisterY).


Thanks for the tips!

I’ve submitted a pull request with the test fixes last night.

@blais
Copy link
Member Author

blais commented May 7, 2019

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


https://bitbucket.org/blais/beancount/addon/pipelines/home#!/results/%7B7a512f44-0db3-42df-a32b-884e227c865a%7D

Looks still broken.

@blais
Copy link
Member Author

blais commented May 7, 2019

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


https://bitbucket.org/blais/beancount/commits/81b95c7ce8880949883a453634c17b165133cd79

Fixed

@blais
Copy link
Member Author

blais commented May 7, 2019

Original comment by Alen Šiljak (Bitbucket: Alen Siljak, GitHub: MisterY).


Thanks. At least now I know how to run the tests for the next time.

@blais
Copy link
Member Author

blais commented May 7, 2019

Original comment by Alen Šiljak (Bitbucket: Alen Siljak, GitHub: MisterY).


Oh, I see. It’s the Hledger tests that fail. I left those out intentionally as I’m not sure hledger supports ISO dates. 🙈

@blais
Copy link
Member Author

blais commented May 9, 2019

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


Good point. HLedger doesn’t support it yet I think:

simonmichael/hledger#933

So this probably broke it.

Not sure anyone cares - I have no idea if anyone’s using that conversion - but it would be a good idea to make it a class attribute of the renderer and dispatch it properly.

@blais
Copy link
Member Author

blais commented May 10, 2019

Original comment by Alen Šiljak (Bitbucket: Alen Siljak, GitHub: MisterY).


Fortunately, I got that wrong. As per https://plaintextaccounting.org/quickref/, different date formats are supported.

The issue was closed this January, so this may be a fairly recent development.

@blais blais added P2 Low priority, addressing would result in useful improvements reports Component: Canned reports proposal labels May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Low priority, addressing would result in useful improvements reports Component: Canned reports
Projects
None yet
Development

No branches or pull requests

1 participant