Module: Holidays::FI

Defined in:
lib/generated_definitions/fi.rb

Overview

This file is generated by the Ruby Holidays gem.

Definitions loaded: definitions/fi.yaml

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

Class Method Summary collapse

Class Method Details

.custom_methodsObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/generated_definitions/fi.rb', line 33

def self.custom_methods
  {
      "fi_juhannusaatto(year)" => Proc.new { |year|
date = Date.civil(year,6,19)
if date.wday > 5 #if 19.6 is saturday
  date += 6
else
  date += (5 - date.wday)
end
date
},

"fi_juhannuspaiva(year)" => Proc.new { |year|
date = Date.civil(year,6,20)
date += (6 - date.wday)
date
},

"fi_pyhainpaiva(year)" => Proc.new { |year|
date = Date.civil(year,10,31)
date += (6 - date.wday)
date
},


  }
end

.defined_regionsObject

:nodoc:



9
10
11
# File 'lib/generated_definitions/fi.rb', line 9

def self.defined_regions
  [:fi]
end

.holidays_by_monthObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/generated_definitions/fi.rb', line 13

def self.holidays_by_month
  {
            0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Pitkäperjantai", :regions => [:fi]},
        {:function => "easter(year)", :function_arguments => [:year], :name => "Pääsiäispäivä", :regions => [:fi]},
        {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "2. Pääsiäispäivä", :regions => [:fi]},
        {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Helatorstai", :regions => [:fi]},
        {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Helluntaipäivä", :regions => [:fi]},
        {:function => "fi_pyhainpaiva(year)", :function_arguments => [:year], :name => "Pyhäinpäivä", :regions => [:fi]}],
  1 => [{:mday => 1, :name => "Uudenvuodenpäivä", :regions => [:fi]},
        {:mday => 6, :name => "Loppiainen", :regions => [:fi]}],
  5 => [{:mday => 1, :name => "Vappu", :regions => [:fi]}],
  6 => [{:function => "fi_juhannusaatto(year)", :function_arguments => [:year], :name => "Juhannusaatto", :regions => [:fi]},
        {:function => "fi_juhannuspaiva(year)", :function_arguments => [:year], :name => "Juhannuspäivä", :regions => [:fi]}],
  12 => [{:mday => 6, :name => "Itsenäisyyspäivä", :regions => [:fi]},
        {:mday => 24, :name => "Jouluaatto", :regions => [:fi]},
        {:mday => 25, :name => "Joulupäivä", :regions => [:fi]},
        {:mday => 26, :name => "Tapaninpäivä", :regions => [:fi]}]
  }
end