- Dropped support for Ruby < 3.3 and Active Record < 7.2
- Added time zone support for SQLite
- Added
day_startsupport for SQLite - Added
group_by_quartersupport for SQLite
- Dropped support for Ruby < 3.2 and Active Record < 7.1
- 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
DateTimeranges
- Added support for async methods with Active Record 7.1
- Added
expand_rangeoption
- Fixed incorrect results (error before 6.0) with
includeswith Active Record 6.1+
- Raise
ActiveRecord::UnknownAttributeReferencefor non-attribute arguments - Raise
ArgumentErrorfor ranges with string bounds - Added
noption for Redshift - Changed SQL to return dates instead of times for day, week, month, quarter, and year
- Removed
datesoption - 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..nilranges inrangeoption
- 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
rangeoption
- Added
noption to minute and second for custom durations
- Added support for
week_startfor SQLite - Added support for full weekday names
- Made
day_startbehavior consistent between Active Record and enumerable - Made
lastoption extend to end of current period - Raise error when
day_startandweek_startpassed to unsupported methods - The
day_startoption no longer applies to shorter periods - Fixed
inconsistent time zone infoerrors around DST with MySQL and PostgreSQL - Improved performance of
formatoption - Removed deprecated positional arguments for time zone and range
- Dropped support for
mysqlgem (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
currentoption work withoutlast - Fixed default value for
maximum,minimum, andaverage(periods with no results now returnnilinstead of0, passdefault_value: 0for previous behavior)
- Fixed incorrect range with
lastoption near time change
- Custom calculation methods are supported by default -
groupdate_calculation_methodsis no longer needed
Breaking changes
- Dropped support for Rails < 4.2
- Invalid options now throw an
ArgumentError group_bymethods return anActiveRecord::Relationinstead of aGroupdate::Seriesweek_startnow 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
lastwithgroup_by_quarter - Raise
ArgumentErrorwhenlastoption is not supported
- Better support for date columns with
time_zone: false - Better date range handling for
rangeoption
- Fixed
group_by_periodwith associations - Fixed
week_startoption for enumerables
- Added support for Redshift
- Fix for infinite loop in certain cases for Rails 5
Breaking changes
Dateobjects are now returned for day, week, month, quarter, and year by default. Usedates: falsefor the previous behavior, or change this globally withGroupdate.dates = false.- Array and hash methods no longer return the entire series by default. Use
series: truefor the previous behavior. - The
series: falseoption now returns the correct types and order, and plays nicely with other options.
- All tests green with
mysqlgem - Added support for decimal day start
- Added
datesoption to return dates for day, week, month, quarter, and year
- Added
group_by_quarter - Added
default_valueoption - Accept symbol for
formatoption - Raise
ArgumentErrorif no field specified - Added support for Active Record 5 beta
- Added
group_by_periodmethod - Added
currentoption - Raise
ArgumentErrorif no block given to enumerable
- Added localization
- Added
carry_forwardoption - Added
series: falseoption for arrays and hashes - Fixed issue w/ Brasilia Summer Time
- Fixed issues w/ Active Record 4.2
- Raise error when
ActiveRecord::Base.default_timezoneis 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