Skip to content

Releases: moneybird/active-date-range

v0.3.2

26 Sep 09:10
4ac17d8
Compare
Choose a tag to compare

What's Changed

  • Fix issue with next years due to leap year by @edwinv in #8
  • Update gems by @edwinv in #9
  • Test with latest Ruby versions by @edwinv in #10
  • Add this_month?, this_quarter? and this_year? by @edwinv in #11

Full Changelog: v0.3.0...v0.3.2

v0.3.0

18 Aug 14:14
715d853
Compare
Choose a tag to compare
  • include? now behaves like cover? for better performance

    Edwin Vlieg

  • Add intersection support:

    date_range.intersection(other_date_range) # => DateRange
    

    Edwin Vlieg

  • Add support for boundless ranges:

    date_range = DateRange.parse('202101..')
    date_range.boundless? # => true
    date_range.in_groups_of(:month) # => Enumerator::Lazy
    Model.where(date: date_range) # => SQL "WHERE date >= 2021-01-01"
    

    Edwin Vlieg

  • Add ActiveModel type for date range:

    attribute :period, :date_range
    

    Edwin Vlieg

v0.2.0

29 Apr 18:08
7a15b27
Compare
Choose a tag to compare

Adds support for weeks:

  • Shorthands for this_week, next_week and prev_week
  • full_week? and one_week?
  • next and previous now handle weeks correctly
  • Tests for biweekly calculations

v0.1.0

22 Apr 08:53
9ae29d6
Compare
Choose a tag to compare

Initial release of the ActiveDateRange gem. Contains an import of the value object from the internal implementation at Moneybird. We've been using this implementation in production for many years, therefore this release is not marked as a pre-release.