Sha256: c066915eefcb0d8fa1b64f66d4388e83a1ba31cf91d6fd8f115717502160a845

Contents?: true

Size: 349 Bytes

Versions: 132

Compression:

Stored size: 349 Bytes

Contents

# frozen_string_literal: true

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

132 entries across 132 versions & 1 rubygems

Version Path
renalware-core-2.0.159 lib/renalware/month_period.rb
renalware-core-2.0.158 lib/renalware/month_period.rb
renalware-core-2.0.157 lib/renalware/month_period.rb
renalware-core-2.0.156 lib/renalware/month_period.rb
renalware-core-2.0.155 lib/renalware/month_period.rb
renalware-core-2.0.153 lib/renalware/month_period.rb
renalware-core-2.0.152 lib/renalware/month_period.rb
renalware-core-2.0.151 lib/renalware/month_period.rb
renalware-core-2.0.149 lib/renalware/month_period.rb
renalware-core-2.0.148 lib/renalware/month_period.rb
renalware-core-2.0.147 lib/renalware/month_period.rb
renalware-core-2.0.146 lib/renalware/month_period.rb
renalware-core-2.0.145 lib/renalware/month_period.rb
renalware-core-2.0.144 lib/renalware/month_period.rb
renalware-core-2.0.143 lib/renalware/month_period.rb
renalware-core-2.0.142 lib/renalware/month_period.rb
renalware-core-2.0.141 lib/renalware/month_period.rb
renalware-core-2.0.140 lib/renalware/month_period.rb
renalware-core-2.0.139 lib/renalware/month_period.rb
renalware-core-2.0.138 lib/renalware/month_period.rb