Module: Holidays::Definition::CustomMethods::CO
- Defined in:
- lib/holidays/definition/custom_methods/co.rb
Overview
co custom holiday calculations, ported verbatim from the
methods: block in definitions/co.yaml.
Class Method Summary collapse
Class Method Details
.to_following_monday_if_not_monday(date) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/holidays/definition/custom_methods/co.rb', line 10 def to_following_monday_if_not_monday(date) if date.wday > 1 date += ( 8 - date.wday ) elsif date.wday == 0 date += 1 end date end |