Skip to content
This repository was archived by the owner on Oct 29, 2023. It is now read-only.

Feature/human readable date input#47

Merged
markusressel merged 2 commits intomasterfrom
feature/human_readable_date_input
Sep 24, 2019
Merged

Feature/human readable date input#47
markusressel merged 2 commits intomasterfrom
feature/human_readable_date_input

Conversation

@markusressel
Copy link
Copy Markdown
Collaborator

Up until now the --from and --to cli parameters have been timestamps since 1970 CET.
In practice this is unusable for a human though, so I changed this to support human readable datetime string input formats. Accepted formats are listed in the const.py:

  • %m/%d/%Y %H:%M:%S
  • %m/%d/%Y
  • %Y-%m-%d
  • %Y-%m-%dT%H:%M:%S
  • %Y-%m-%d %H:%M:%S
  • %d.%m.%Y
  • %d.%m.%Y %H:%M:%S

I also plan on adding a --duration parameter that allows a user to easily get a specific time range without having to calculate the dates him- or herself.

This PR also adds a Date column to the transactions output.

do not limit transactions output if --from parameter is set
print date of transaction
allow the use of --from and --to independent from one another
use datetime input for statistics command as well
added datetime formats
added arguments to test
Comment thread n26/cli.py

return extractor


Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method has just moved, nothing changed.

Comment thread n26/cli.py
if param_to is not None:
if param_from is None:
# if --to is set, --from must also be set
from_timestamp = 1
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using 1 here since 0 acted like None.
That is the reason I added the > 0 thingy to the API documentation.

@femueller
Copy link
Copy Markdown
Owner

@markusressel Looks good to me

@markusressel
Copy link
Copy Markdown
Collaborator Author

I would like to hold back on merging this until the general functionality of the library is restored since it might introduce unforeseen problems.

@markusressel markusressel self-assigned this Sep 17, 2019
@markusressel markusressel merged commit 1ff303d into master Sep 24, 2019
@markusressel markusressel deleted the feature/human_readable_date_input branch September 24, 2019 20:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants