Sha256: 552941da984feb7cc5a8a206e3402b87c54a25a8d59f1617d20efcc677be2bba

Contents?: true

Size: 304 Bytes

Versions: 10

Compression:

Stored size: 304 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
renalware-core-2.1.1 lib/month_period.rb
renalware-core-2.1.0 lib/month_period.rb
renalware-core-2.0.167 lib/month_period.rb
renalware-core-2.0.166 lib/month_period.rb
renalware-core-2.0.165 lib/month_period.rb
renalware-core-2.0.164 lib/month_period.rb
renalware-core-2.0.163 lib/month_period.rb
renalware-core-2.0.162 lib/month_period.rb
renalware-core-2.0.161 lib/month_period.rb
renalware-core-2.0.160 lib/month_period.rb