- Fixed connection leasing for Active Record 7.2+
- Added support for Active Record 8
- Dropped support for Ruby < 3.1 and Active Record < 7
- Added support for Trilogy
- Dropped support for Ruby < 3 and Rails < 6.1
- Fixed extra day with
DateTime
ranges
- Added support for async methods with Active Record 7.1
- Added
expand_range
option
- Fixed incorrect results (error before 6.0) with
includes
with Active Record 6.1+
- Raise
ActiveRecord::UnknownAttributeReference
for non-attribute arguments - Raise
ArgumentError
for ranges with string bounds - Added
n
option for Redshift - Changed SQL to return dates instead of times for day, week, month, quarter, and year
- Removed
dates
option - Dropped support for Ruby < 2.6 and Rails < 5.2
- Simplified queries for Active Record 7 and MySQL
- Fixed error and warnings with Active Record 7
- Added support for
nil..nil
ranges inrange
option
- Improved error message for invalid ranges
- Fixed bug with date string ranges
- Added warning for non-attribute argument
- Added support for beginless and endless ranges in
range
option
- Added
n
option to minute and second for custom durations
- Added support for
week_start
for SQLite - Added support for full weekday names
- Made
day_start
behavior consistent between Active Record and enumerable - Made
last
option extend to end of current period - Raise error when
day_start
andweek_start
passed to unsupported methods - The
day_start
option no longer applies to shorter periods - Fixed
inconsistent time zone info
errors around DST with MySQL and PostgreSQL - Improved performance of
format
option - Removed deprecated positional arguments for time zone and range
- Dropped support for
mysql
gem (last release was 2013)
- Fixed error with empty results in Ruby 2.7
- Fixed deprecation warnings in Ruby 2.7
- Deprecated positional arguments for time zone and range
- Added
day_of_year
- Dropped support for Rails 4.2
- Fixed error with empty data and
current: false
- Fixed error in time zone check for Rails < 5.2
- Prevent infinite loop with endless ranges
- Made column resolution consistent with
group
- Added support for
alias_attribute
- Many performance improvements
- Added check for consistent time zone info
- Fixed error message for invalid queries with MySQL and SQLite
- Fixed issue with enumerable methods ignoring nils
- Make
current
option work withoutlast
- Fixed default value for
maximum
,minimum
, andaverage
(periods with no results now returnnil
instead of0
, passdefault_value: 0
for previous behavior)
- Fixed incorrect range with
last
option near time change
- Custom calculation methods are supported by default -
groupdate_calculation_methods
is no longer needed
Breaking changes
- Dropped support for Rails < 4.2
- Invalid options now throw an
ArgumentError
group_by
methods return anActiveRecord::Relation
instead of aGroupdate::Series
week_start
now affectsday_of_week
- Removed support for
reverse_order
(was never supported in Rails 5)
- Added
minute_of_hour
- Added support for
unscoped
- Added limited support for SQLite
- Fixed
current: false
- Fixed
last
withgroup_by_quarter
- Raise
ArgumentError
whenlast
option is not supported
- Better support for date columns with
time_zone: false
- Better date range handling for
range
option
- Fixed
group_by_period
with associations - Fixed
week_start
option for enumerables
- Added support for Redshift
- Fix for infinite loop in certain cases for Rails 5
Breaking changes
Date
objects are now returned for day, week, month, quarter, and year by default. Usedates: false
for the previous behavior, or change this globally withGroupdate.dates = false
.- Array and hash methods no longer return the entire series by default. Use
series: true
for the previous behavior. - The
series: false
option now returns the correct types and order, and plays nicely with other options.
- All tests green with
mysql
gem - Added support for decimal day start
- Added
dates
option to return dates for day, week, month, quarter, and year
- Added
group_by_quarter
- Added
default_value
option - Accept symbol for
format
option - Raise
ArgumentError
if no field specified - Added support for Active Record 5 beta
- Added
group_by_period
method - Added
current
option - Raise
ArgumentError
if no block given to enumerable
- Added localization
- Added
carry_forward
option - Added
series: false
option for arrays and hashes - Fixed issue w/ Brasilia Summer Time
- Fixed issues w/ Active Record 4.2
- Raise error when
ActiveRecord::Base.default_timezone
is not:utc
- Added
day_of_month
- Added
month_of_year
- Do not quote column name
- Fixed Active Record 3 associations
- Added support for arrays and hashes
- Fixed format option with multiple groups
- Better error message if time zone support is missing for MySQL
- Added last option
- Added format option
- Added multiple groups
- Added order
- Subsequent methods no longer modify relation
- Implemented respond_to?
- where, joins, and includes no longer need to be before the group_by method
- Use time zone instead of UTC for results
- Returns entire series by default
- Added day_start option
- Better interface
- Added global time_zone option
- Added global week_start option
- Fixed bug with NULL values and series
- Fixed deprecation warning when used with will_paginate
- Fixed bug with DateTime series
- Added :start option for custom week start for group_by_week
- Fixed series for Rails < 3.2 and MySQL
- First major release
- Fixed error with Ruby 1.8
- Added support for getting the entire series
- Added support for Ruby 1.8
- Improved field names for ordering
- Added ability to order easily
- Improved return types for MySQL
- Added
day_of_week
- Added
hour_of_day
- Added support for Rails time zone strings
- Added tests
- First release