github-activity-generator icon indicating copy to clipboard operation
github-activity-generator copied to clipboard

suggestion: support negative values for days_after

Open jeremiah-shore opened this issue 2 years ago • 1 comments

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. 😃

jeremiah-shore avatar Aug 22 '23 20:08 jeremiah-shore