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

Comments

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

Open
AirbornePorcine wants to merge 3 commits intogorhill:masterfrom
calgaryscientific:master
Open

Handling for day-of-week spans ending in seven#12
AirbornePorcine wants to merge 3 commits intogorhill:masterfrom
calgaryscientific:master

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