Skip to content

Releases: moneybird/active-date-range

v.0.4.1

Choose a tag to compare

@vindia-mb vindia-mb released this 09 Oct 10:32
993a3a7

What's Changed

Full Changelog: v0.4.0...v0.4.1

v.0.4.0

Choose a tag to compare

@vindia-mb vindia-mb released this 09 Oct 09:47
67e13a1

What's Changed

  • Introduce #current? to check if the period overlays the current date by @edwinv in #12
  • update to ruby 3.4 by @vindia-mb in #13
  • add #stretch_to_end_of_month by @vindia-mb in #17
  • add #exceeds? by @vindia-mb in #18
  • add .from_date_and_duration in 9db6d80
  • allow parse to receive a nil parameter and return nil in 61889af

New Contributors

Full Changelog: v0.3.2...v0.4.0

v0.3.2

Choose a tag to compare

@edwinv edwinv released this 26 Sep 09:10
4ac17d8

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

Choose a tag to compare

@edwinv edwinv released this 18 Aug 14:14
715d853
  • 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

Choose a tag to compare

@edwinv edwinv released this 29 Apr 18:08
7a15b27

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

Choose a tag to compare

@edwinv edwinv released this 22 Apr 08:53
9ae29d6

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.