holidays 1.0.8 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +19 -0
  4. data/Rakefile +1 -2
  5. data/data/au.yaml +81 -1
  6. data/data/ca.yaml +40 -3
  7. data/data/cr.yaml +63 -0
  8. data/data/federal_reserve.yaml +4 -28
  9. data/data/fedex.yaml +56 -0
  10. data/data/index.yaml +2 -0
  11. data/data/jp.yaml +8 -1
  12. data/lib/holidays.rb +219 -0
  13. data/lib/holidays/MANIFEST +2 -0
  14. data/lib/holidays/ar.rb +1 -1
  15. data/lib/holidays/at.rb +1 -1
  16. data/lib/holidays/au.rb +27 -4
  17. data/lib/holidays/be.rb +1 -1
  18. data/lib/holidays/br.rb +1 -1
  19. data/lib/holidays/ca.rb +6 -3
  20. data/lib/holidays/ch.rb +1 -1
  21. data/lib/holidays/cl.rb +1 -1
  22. data/lib/holidays/cr.rb +39 -0
  23. data/lib/holidays/cz.rb +1 -1
  24. data/lib/holidays/de.rb +2 -2
  25. data/lib/holidays/dk.rb +1 -1
  26. data/lib/holidays/ecb_target.rb +1 -1
  27. data/lib/holidays/el.rb +1 -1
  28. data/lib/holidays/es.rb +1 -1
  29. data/lib/holidays/europe.rb +75 -32
  30. data/lib/holidays/fed_ex.rb +36 -0
  31. data/lib/holidays/federal_reserve.rb +5 -8
  32. data/lib/holidays/fi.rb +1 -1
  33. data/lib/holidays/fr.rb +1 -1
  34. data/lib/holidays/gb.rb +1 -1
  35. data/lib/holidays/hr.rb +1 -1
  36. data/lib/holidays/hu.rb +1 -1
  37. data/lib/holidays/ie.rb +1 -1
  38. data/lib/holidays/is.rb +1 -1
  39. data/lib/holidays/it.rb +1 -1
  40. data/lib/holidays/jp.rb +3 -2
  41. data/lib/holidays/li.rb +1 -1
  42. data/lib/holidays/lt.rb +1 -1
  43. data/lib/holidays/ma.rb +1 -1
  44. data/lib/holidays/mx.rb +1 -1
  45. data/lib/holidays/nerc.rb +1 -1
  46. data/lib/holidays/nl.rb +1 -1
  47. data/lib/holidays/no.rb +1 -1
  48. data/lib/holidays/north_america.rb +8 -5
  49. data/lib/holidays/nyse.rb +1 -1
  50. data/lib/holidays/nz.rb +1 -1
  51. data/lib/holidays/pl.rb +1 -1
  52. data/lib/holidays/pt.rb +1 -1
  53. data/lib/holidays/ro.rb +1 -1
  54. data/lib/holidays/scandinavia.rb +18 -11
  55. data/lib/holidays/se.rb +1 -1
  56. data/lib/holidays/sg.rb +1 -1
  57. data/lib/holidays/si.rb +1 -1
  58. data/lib/holidays/sk.rb +1 -1
  59. data/lib/holidays/united_nations.rb +3 -3
  60. data/lib/holidays/ups.rb +1 -1
  61. data/lib/holidays/us.rb +1 -1
  62. data/lib/holidays/ve.rb +1 -1
  63. data/lib/holidays/version.rb +1 -1
  64. data/lib/holidays/vi.rb +1 -1
  65. data/lib/holidays/za.rb +1 -1
  66. data/test/data/test_custom_govt_holiday_defs.yaml +5 -0
  67. data/test/data/test_multiple_custom_holiday_defs.yaml +9 -0
  68. data/test/data/test_single_custom_holiday_defs.yaml +9 -0
  69. data/test/defs/test_defs_au.rb +32 -0
  70. data/test/defs/test_defs_ca.rb +25 -0
  71. data/test/defs/test_defs_cr.rb +22 -0
  72. data/test/defs/test_defs_de.rb +6 -6
  73. data/test/defs/test_defs_europe.rb +24 -0
  74. data/test/defs/test_defs_fed_ex.rb +21 -0
  75. data/test/defs/test_defs_federal_reserve.rb +2 -15
  76. data/test/defs/test_defs_jp.rb +1 -0
  77. data/test/defs/test_defs_north_america.rb +25 -0
  78. data/test/defs/test_defs_united_nations.rb +12 -0
  79. data/test/test_custom_holidays.rb +35 -0
  80. data/test/test_parse_definitions.rb +24 -0
  81. metadata +22 -3
  82. data/data/build_defs.rb +0 -157
@@ -4,22 +4,21 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/federal_reserve.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
11
11
  # require 'holidays/federal_reserve'
12
12
  #
13
13
  # All the definitions are available at https://github.com/alexdunae/holidays
14
- module Federal_Reserve # :nodoc:
14
+ module FEDERAL_RESERVE # :nodoc:
15
15
  def self.defined_regions
16
16
  [:federal_reserve]
17
17
  end
18
18
 
19
19
  def self.holidays_by_month
20
20
  {
21
- 0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:federal_reserve]}],
22
- 1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "New Year's Day", :regions => [:federal_reserve]},
21
+ 1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "New Year's Day", :regions => [:federal_reserve]},
23
22
  {:wday => 1, :week => 3, :name => "Birthday of Martin Luther King, Jr", :regions => [:federal_reserve]},
24
23
  {:function => lambda { |year| Holidays.us_inauguration_day(year) }, :function_id => "us_inauguration_day(year)", :name => "Inauguration Day", :regions => [:federal_reserve]}],
25
24
  2 => [{:wday => 1, :week => 3, :name => "Washington's Birthday", :regions => [:federal_reserve]}],
@@ -29,9 +28,7 @@ module Holidays
29
28
  10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:federal_reserve]}],
30
29
  11 => [{:mday => 11, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Veterans Day", :regions => [:federal_reserve]},
31
30
  {:wday => 4, :week => 4, :name => "Thanksgiving Day", :regions => [:federal_reserve]}],
32
- 12 => [{:mday => 24, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Christmas Eve", :regions => [:federal_reserve]},
33
- {:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Christmas Day", :regions => [:federal_reserve]},
34
- {:mday => 31, :name => "New Year's Eve", :regions => [:federal_reserve]}]
31
+ 12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Christmas Day", :regions => [:federal_reserve]}]
35
32
  }
36
33
  end
37
34
  end
@@ -47,4 +44,4 @@ end
47
44
 
48
45
  end
49
46
 
50
- Holidays.merge_defs(Holidays::Federal_Reserve.defined_regions, Holidays::Federal_Reserve.holidays_by_month)
47
+ Holidays.merge_defs(Holidays::FEDERAL_RESERVE.defined_regions, Holidays::FEDERAL_RESERVE.holidays_by_month)
data/lib/holidays/fi.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/fi.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/fr.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/fr.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/gb.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/gb.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/hr.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/hr.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/hu.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/hu.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/ie.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/ie.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/is.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/is.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/it.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/it.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/jp.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/jp.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
@@ -19,7 +19,8 @@ module Holidays
19
19
  def self.holidays_by_month
20
20
  {
21
21
  1 => [{:mday => 1, :name => "元日", :regions => [:jp]},
22
- {:wday => 1, :week => 2, :name => "成人の日", :regions => [:jp]}],
22
+ {:wday => 1, :week => 2, :name => "成人の日", :regions => [:jp]},
23
+ {:function => lambda { |year| Holidays.jp_substitute_holiday(year, 1, 1) }, :function_id => "jp_substitute_holiday(year, 1, 1)", :name => "振替休日", :regions => [:jp]}],
23
24
  2 => [{:mday => 11, :name => "建国記念日", :regions => [:jp]},
24
25
  {:function => lambda { |year| Holidays.jp_substitute_holiday(year, 2, 11) }, :function_id => "jp_substitute_holiday(year, 2, 11)", :name => "振替休日", :regions => [:jp]}],
25
26
  3 => [{:function => lambda { |year| Holidays.jp_vernal_equinox_day(year) }, :function_id => "jp_vernal_equinox_day(year)", :name => "春分の日", :regions => [:jp]},
data/lib/holidays/li.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/li.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/lt.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/lt.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/ma.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/ma.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/mx.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/mx.yaml, data/north_america_informal.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/nerc.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/nerc.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/nl.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/nl.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/no.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/no.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
@@ -4,16 +4,16 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/ca.yaml, data/mx.yaml, data/us.yaml, data/north_america_informal.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
11
11
  # require 'holidays/north_america'
12
12
  #
13
13
  # All the definitions are available at https://github.com/alexdunae/holidays
14
- module North_America # :nodoc:
14
+ module NORTH_AMERICA # :nodoc:
15
15
  def self.defined_regions
16
- [:ca, :ca_qc, :ca_ab, :ca_on, :ca_sk, :ca_mb, :ca_bc, :ca_nf, :ca_nt, :ca_nu, :ca_ns, :ca_yk, :mx, :mx_pue, :us, :us_dc]
16
+ [:ca, :ca_qc, :ca_ab, :ca_on, :ca_sk, :ca_mb, :ca_ns, :ca_pe, :ca_bc, :ca_nf, :ca_nt, :ca_nu, :ca_nb, :ca_yk, :mx, :mx_pue, :us, :us_dc]
17
17
  end
18
18
 
19
19
  def self.holidays_by_month
@@ -32,6 +32,8 @@ module Holidays
32
32
  {:function => lambda { |year| Holidays.us_inauguration_day(year) }, :function_id => "us_inauguration_day(year)", :name => "Inauguration Day", :regions => [:us_dc]}],
33
33
  2 => [{:wday => 1, :week => 3, :name => "Family Day", :regions => [:ca_ab, :ca_on, :ca_sk]},
34
34
  {:wday => 1, :week => 3, :name => "Louis Riel Day", :regions => [:ca_mb]},
35
+ {:wday => 1, :week => 3, :name => "Nova Scotia Heritage Day", :regions => [:ca_ns]},
36
+ {:wday => 1, :week => 3, :name => "Islander Day", :regions => [:ca_pe]},
35
37
  {:wday => 1, :week => 2, :name => "BC Family Day", :regions => [:ca_bc]},
36
38
  {:wday => 1, :week => 1, :name => "Día de la Constitución", :regions => [:mx]},
37
39
  {:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:us]},
@@ -63,7 +65,8 @@ module Holidays
63
65
  {:wday => 1, :week => 1, :name => "Saskatchewan Day", :regions => [:ca_sk]},
64
66
  {:wday => 1, :week => 1, :name => "Heritage Day", :regions => [:ca_ab]},
65
67
  {:wday => 1, :week => 1, :name => "Natal Day", :regions => [:ca_ns]},
66
- {:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_on]},
68
+ {:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_on, :ca_nt, :ca_nu, :ca_pe]},
69
+ {:wday => 1, :week => 1, :name => "New Brunswick Day", :regions => [:ca_nb]},
67
70
  {:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yk]}],
68
71
  9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
69
72
  {:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
@@ -114,4 +117,4 @@ end
114
117
 
115
118
  end
116
119
 
117
- Holidays.merge_defs(Holidays::North_America.defined_regions, Holidays::North_America.holidays_by_month)
120
+ Holidays.merge_defs(Holidays::NORTH_AMERICA.defined_regions, Holidays::NORTH_AMERICA.holidays_by_month)
data/lib/holidays/nyse.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/nyse.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/nz.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/nz.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/pl.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/pl.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/pt.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/pt.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/ro.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/ro.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
@@ -4,28 +4,28 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/dk.yaml, data/is.yaml, data/no.yaml, data/se.yaml, data/fi.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
11
11
  # require 'holidays/scandinavia'
12
12
  #
13
13
  # All the definitions are available at https://github.com/alexdunae/holidays
14
- module Scandinavia # :nodoc:
14
+ module SCANDINAVIA # :nodoc:
15
15
  def self.defined_regions
16
- [:dk, :no, :is, :se, :fi]
16
+ [:dk, :is, :no, :se, :fi]
17
17
  end
18
18
 
19
19
  def self.holidays_by_month
20
20
  {
21
- 0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk, :no]},
22
- {:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk, :no]},
21
+ 0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk]},
22
+ {:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk]},
23
23
  {:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
24
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:dk, :no]},
24
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:dk]},
25
25
  {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Påskedag", :regions => [:dk]},
26
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:dk, :no]},
26
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:dk]},
27
27
  {:function => lambda { |year| Holidays.easter(year)+26 }, :function_id => "easter(year)+26", :name => "Store Bededag", :regions => [:dk]},
28
- {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk, :no]},
28
+ {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk]},
29
29
  {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinsedag", :regions => [:dk]},
30
30
  {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. Pinsedag", :regions => [:dk]},
31
31
  {:function => lambda { |year| Holidays.easter(year)-48 }, :function_id => "easter(year)-48", :name => "Bolludagur", :regions => [:is]},
@@ -39,8 +39,13 @@ module Holidays
39
39
  {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Uppstigningardagur", :regions => [:is]},
40
40
  {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Hvítasunnudagur", :regions => [:is]},
41
41
  {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Annar í hvítasunnu", :regions => [:is]},
42
+ {:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:no]},
43
+ {:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:no]},
42
44
  {:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skjærtorsdag", :regions => [:no]},
45
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:no]},
43
46
  {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "1. påskedag", :regions => [:no]},
47
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:no]},
48
+ {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:no]},
44
49
  {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "1. pinsedag", :regions => [:no]},
45
50
  {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. pinsedag", :regions => [:no]},
46
51
  {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Långfredagen", :regions => [:se]},
@@ -91,13 +96,15 @@ module Holidays
91
96
  {:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]}],
92
97
  12 => [{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
93
98
  {:mday => 24, :type => :informal, :name => "Juleaftensdag", :regions => [:dk]},
94
- {:mday => 25, :name => "1. juledag", :regions => [:dk, :no]},
95
- {:mday => 26, :name => "2. juledag", :regions => [:dk, :no]},
99
+ {:mday => 25, :name => "1. juledag", :regions => [:dk]},
100
+ {:mday => 26, :name => "2. juledag", :regions => [:dk]},
96
101
  {:mday => 24, :name => "Jól", :regions => [:is]},
97
102
  {:mday => 25, :name => "Jól", :regions => [:is]},
98
103
  {:mday => 26, :name => "Jól", :regions => [:is]},
99
104
  {:mday => 31, :name => "Gamlárskvöld", :regions => [:is]},
100
105
  {:mday => 24, :type => :informal, :name => "Julaften", :regions => [:no]},
106
+ {:mday => 25, :name => "1. juledag", :regions => [:no]},
107
+ {:mday => 26, :name => "2. juledag", :regions => [:no]},
101
108
  {:mday => 31, :type => :informal, :name => "Nyttårsaften", :regions => [:no]},
102
109
  {:mday => 24, :type => :informal, :name => "Julafton", :regions => [:se]},
103
110
  {:mday => 25, :name => "Juldagen", :regions => [:se]},
@@ -172,4 +179,4 @@ end
172
179
 
173
180
  end
174
181
 
175
- Holidays.merge_defs(Holidays::Scandinavia.defined_regions, Holidays::Scandinavia.holidays_by_month)
182
+ Holidays.merge_defs(Holidays::SCANDINAVIA.defined_regions, Holidays::SCANDINAVIA.holidays_by_month)
data/lib/holidays/se.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/se.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/sg.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/sg.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/si.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/si.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
data/lib/holidays/sk.rb CHANGED
@@ -4,7 +4,7 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/sk.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
@@ -4,14 +4,14 @@ module Holidays
4
4
  #
5
5
  # Definitions loaded: data/united_nations.yaml
6
6
  #
7
- # To use the definitions in this file, load it right after you load the
7
+ # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
9
9
  #
10
10
  # require 'holidays'
11
11
  # require 'holidays/united_nations'
12
12
  #
13
13
  # All the definitions are available at https://github.com/alexdunae/holidays
14
- module United_Nations # :nodoc:
14
+ module UNITED_NATIONS # :nodoc:
15
15
  def self.defined_regions
16
16
  [:united_nations]
17
17
  end
@@ -82,4 +82,4 @@ module Holidays
82
82
 
83
83
  end
84
84
 
85
- Holidays.merge_defs(Holidays::United_Nations.defined_regions, Holidays::United_Nations.holidays_by_month)
85
+ Holidays.merge_defs(Holidays::UNITED_NATIONS.defined_regions, Holidays::UNITED_NATIONS.holidays_by_month)