Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Handling for day-of-week spans ending in seven #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Handling for day-of-week spans ending in seven #12

wants to merge 3 commits into from

Conversation

AirbornePorcine
Copy link

In the current implementation, day-of-week spans that end in seven (ie 5-7) will not generate any values when calling next. The underlying issue is that populateMany generates its list based on a for between min and max values, and we set Sunday/7 to be an equivalent max value of zero.

We weren't entirely sure how to fix it at that point, so we added a quick piece of logic to remap the zero value to six (Saturday) when the end of a day-of-week span is seven. Suggestions for a less hacky-feeling way of fixing this are welcome of course.

@josegonzalez
Copy link

@gorhill bump :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants