Module: Holidays::GB

Defined in:
lib/generated_definitions/gb.rb

Overview

This file is generated by the Ruby Holidays gem.

Definitions loaded: definitions/gb.yaml

To use the definitions in this file, load it right after you load the Holiday gem:

require 'holidays'
require 'generated_definitions/gb'

All the definitions are available at github.com/holidays/holidays

Class Method Summary collapse

Class Method Details

.custom_methodsObject



43
44
45
46
47
# File 'lib/generated_definitions/gb.rb', line 43

def self.custom_methods
  {
    
  }
end

.defined_regionsObject

:nodoc:



15
16
17
# File 'lib/generated_definitions/gb.rb', line 15

def self.defined_regions
  [:gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :im, :gb_iom]
end

.holidays_by_monthObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/generated_definitions/gb.rb', line 19

def self.holidays_by_month
  {
          0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:gb]},
        {:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:gb]},
        {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]}],
  1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:gb]},
        {:mday => 2, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "2nd January", :regions => [:gb_sct]}],
  3 => [{:mday => 5, :name => "St. Piran's Day", :regions => [:gb_con]},
        {:mday => 17, :name => "St. Patrick's Day", :regions => [:gb_nir]}],
  5 => [{:wday => 1, :week => 1, :name => "May Day", :regions => [:gb]},
        {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
        {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]}],
  7 => [{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
        {:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
  8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct]},
        {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]}],
  11 => [{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
        {:mday => 30,  :year_ranges => [{:before => 2006}],:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "St. Andrew's Day", :regions => [:gb_sct]},
        {:mday => 30,  :year_ranges => [{:after => 2007}],:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "St. Andrew's Day", :regions => [:gb_sct]}],
  12 => [{:mday => 25, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:gb]},
        {:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:gb]}]
  }
end