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

suggestion: support negative values for days_after #32

Open
jeremiah-shore opened this issue Aug 22, 2023 · 0 comments
Open

suggestion: support negative values for days_after #32

jeremiah-shore opened this issue Aug 22, 2023 · 0 comments

Comments

@jeremiah-shore
Copy link

Negative values can be reasonably supported for the days_after param if you update the error condition to the following:

if days_after + days_before < 0:
        sys.exit('the absolute value of days_after cannot exceed the value of days before')

When the value is negative, and used with days_before, it allows the param to behave like an "until ___ days before today" value.

Due to GitHub repo visibility constraints—you can't make forked public repos private—I didn't want to create a fork and PR myself. I was thinking it might be helpful to offer it up here though. 😃

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

No branches or pull requests

1 participant