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