Class: PatchDateCalculator

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

Overview

Calculates the next patch release date. Patch releases are scheduled twice a month based on the monthly release:

  • On the second Wednesday of the month (the week before the monthly release)

  • On the fourth Wednesday of the month (the week after the monthly release)

Instance Method Summary collapse

Constructor Details

#initializePatchDateCalculator

Returns a new instance of PatchDateCalculator.



11
12
13
# File 'lib/gitlab_releases/patch_date_calculator.rb', line 11

def initialize
  @next_release_date = ReleaseVersions.upcoming_release_date
end

Instance Method Details

#executeObject



15
16
17
# File 'lib/gitlab_releases/patch_date_calculator.rb', line 15

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