Class: DateCalculator

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab_releases/date_calculator.rb

Instance Method Summary collapse

Constructor Details

#initialize(next_version:, candidate_date:) ⇒ DateCalculator

the first day of the month.

Parameters:

  • version (ReleaseVersion)
  • candidate_date (Date)
    • The month to calculate the release date. It should be



9
10
11
12
# File 'lib/gitlab_releases/date_calculator.rb', line 9

def initialize(next_version:, candidate_date:)
  @next_version = next_version
  @candidate_date = candidate_date
end

Instance Method Details

#executeObject



14
15
16
# File 'lib/gitlab_releases/date_calculator.rb', line 14

def execute
  calculate_third_thursday_of_month.strftime('%Y-%m-%d')
end