Module: Holidays::AU
- Defined in:
- lib/holidays/au.rb
Overview
This file is generated by the Ruby Holidays gem.
Definitions loaded: data/au.yaml
To use the definitions in this file, load it right after you load the Holiday gem:
require 'holidays'
require 'holidays/au'
All the definitions are available at github.com/alexdunae/holidays
Class Method Summary collapse
Class Method Details
.defined_regions ⇒ Object
:nodoc:
15 16 17 |
# File 'lib/holidays/au.rb', line 15 def self.defined_regions [:au, :au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_qld_brisbane, :au_tas, :au_wa] end |
.holidays_by_month ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/holidays/au.rb', line 19 def self.holidays_by_month { 0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:au]}, {:function => lambda { |year| Holidays.easter(year)-1 }, :function_id => "easter(year)-1", :name => "Easter Saturday", :regions => [:au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_qld_brisbane]}, {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Easter Sunday", :regions => [:au_nsw]}, {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:au]}, {:function => lambda { |year| Holidays.easter(year)+2 }, :function_id => "easter(year)+2", :name => "Easter Monday", :regions => [:au_tas]}], 1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "New Year's Day", :regions => [:au]}, {:mday => 26, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Australia Day", :regions => [:au]}], 3 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_wa]}, {:wday => 1, :week => 2, :name => "Eight Hours Day", :regions => [:au_tas]}, {:wday => 1, :week => 2, :name => "Labour Day", :regions => [:au_vic]}], 4 => [{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "ANZAC Day", :regions => [:au]}], 5 => [{:function => lambda { |year| Holidays.qld_labour_day_may(year) }, :function_id => "qld_labour_day_may(year)", :name => "Labour Day", :regions => [:au_qld]}, {:wday => 1, :week => 1, :name => "May Day", :regions => [:au_nt]}], 6 => [{:wday => 1, :week => 1, :name => "Foundation Day", :regions => [:au_wa]}, {:wday => 1, :week => 2, :name => "Queen's Birthday", :regions => [:au_act, :au_nsw, :au_sa, :au_qld, :au_tas, :au_nt, :au_vic]}, {:mday => 6, :type => :informal, :name => "Queensland Day", :regions => [:au_qld]}], 8 => [{:wday => 3, :week => -3, :name => "Ekka", :regions => [:au_qld_brisbane]}], 10 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_act, :au_nsw, :au_sa]}, {:function => lambda { |year| Holidays.qld_labour_day_october(year) }, :function_id => "qld_labour_day_october(year)", :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Labour Day", :regions => [:au_qld]}, {:function => lambda { |year| Holidays.qld_queens_bday_october(year) }, :function_id => "qld_queens_bday_october(year)", :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Queen's Birthday", :regions => [:au_qld]}], 12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:au]}, {:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:au]}] } end |