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

Fixes time_range for quarter/last combination #151

merged 1 commit into from Oct 26, 2016


Copy link

time_range was nil when grouping by quarter causing the WHERE clause to be, for example:

AND (created_at IS NOT NULL)

`time_range` was nil when grouping by quarter.
@ankane ankane merged commit 5479431 into ankane:master Oct 26, 2016
Copy link

ankane commented Oct 26, 2016

Awesome, thanks @leonelgalan! Complete with tests 💯 Going to make one small change to loop over steps rather than multiply due to this behavior.

today =
# 2016-10-25 00:00:00 -0700
today - 12.months
# 2015-10-25 00:00:00 -0700
today - 12 * 1.month
# 2015-10-31 00:00:00 -0700

Copy link
Contributor Author

Sure thing, thanks for for pointing it out. I learned something new today.

ankane added a commit that referenced this pull request Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants