Sha256: 5a68cd83f38f88acd1265573bcca6118990830355063004f904461d6a0a8c65b

Contents?: true

Size: 318 Bytes

Versions: 35

Compression:

Stored size: 318 Bytes

Contents

module Renalware
  class MonthPeriod
    attr_reader :month, :year, :start, :finish

    def initialize(month:, year:)
      @month = month
      @year = year
      @start = Time.new(year, month, 1, 0, 0, 0)
      @finish = start.end_of_month.end_of_day
    end

    def to_range
      start..finish
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
renalware-core-2.0.16 lib/renalware/month_period.rb
renalware-core-2.0.15 lib/renalware/month_period.rb
renalware-core-2.0.14 lib/renalware/month_period.rb
renalware-core-2.0.13 lib/renalware/month_period.rb
renalware-core-2.0.12 lib/renalware/month_period.rb
renalware-core-2.0.11 lib/renalware/month_period.rb
renalware-core-2.0.9 lib/renalware/month_period.rb
renalware-core-2.0.8 lib/renalware/month_period.rb
renalware-core-2.0.7 lib/renalware/month_period.rb
renalware-core-2.0.5 lib/renalware/month_period.rb
renalware-core-2.0.4 lib/renalware/month_period.rb
renalware-core-2.0.3 lib/renalware/month_period.rb
renalware-core-2.0.2 lib/renalware/month_period.rb
renalware-core-2.0.1 lib/renalware/month_period.rb
renalware-core-2.0.0 lib/renalware/month_period.rb
renalware-core-2.0.0.pre.rc13 lib/renalware/month_period.rb
renalware-core-2.0.0.pre.rc11 lib/renalware/month_period.rb
renalware-core-2.0.0.pre.rc10 lib/renalware/month_period.rb
renalware-core-2.0.0.pre.rc9 lib/renalware/month_period.rb
renalware-core-2.0.0.pre.rc8 lib/renalware/month_period.rb