Added Norwegian defs
This commit is contained in:
parent
0e10fbfb88
commit
5dec1f7081
7 changed files with 191 additions and 11 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
== 1.0.0
|
== 1.0.0
|
||||||
* Added Czech holidays (thanks to boblin -- http://github.com/boblin)
|
* Added Czech holidays (thanks to boblin -- http://github.com/boblin)
|
||||||
|
* Added Norwegian holidays (thanks to Peter Skeide)
|
||||||
|
|
||||||
== 0.9.3
|
== 0.9.3
|
||||||
* Added New York Stock Exchange holidays (thank you Alan Larkin).
|
* Added New York Stock Exchange holidays (thank you Alan Larkin).
|
||||||
|
|
|
@ -14,6 +14,7 @@ defs:
|
||||||
IT: ['it.yaml']
|
IT: ['it.yaml']
|
||||||
MX: ['mx.yaml', 'north_america_informal.yaml']
|
MX: ['mx.yaml', 'north_america_informal.yaml']
|
||||||
NL: ['nl.yaml']
|
NL: ['nl.yaml']
|
||||||
|
"NO": ['no.yaml']
|
||||||
NYSE: ['nyse.yaml']
|
NYSE: ['nyse.yaml']
|
||||||
PT: ['pt.yaml']
|
PT: ['pt.yaml']
|
||||||
US: ['us.yaml', 'north_america_informal.yaml']
|
US: ['us.yaml', 'north_america_informal.yaml']
|
||||||
|
@ -21,4 +22,4 @@ defs:
|
||||||
UPS: ['ups.yaml']
|
UPS: ['ups.yaml']
|
||||||
ZA: ['za.yaml']
|
ZA: ['za.yaml']
|
||||||
North_America: ['ca.yaml', 'mx.yaml', 'us.yaml', 'north_america_informal.yaml']
|
North_America: ['ca.yaml', 'mx.yaml', 'us.yaml', 'north_america_informal.yaml']
|
||||||
Europe: ['cz.yaml', 'dk.yaml', 'de.yaml', 'es.yaml', 'fr.yaml', 'gb.yaml', 'ie.yaml', 'is.yaml', 'it.yaml', 'nl.yaml', 'pt.yaml']
|
Europe: ['cz.yaml', 'dk.yaml', 'de.yaml', 'es.yaml', 'fr.yaml', 'gb.yaml', 'ie.yaml', 'is.yaml', 'it.yaml', 'nl.yaml', 'no.yaml', 'pt.yaml']
|
||||||
|
|
82
data/no.yaml
Normal file
82
data/no.yaml
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
# Norwegian holiday definitions for the Ruby Holiday gem.
|
||||||
|
#
|
||||||
|
# Added: 20010-02-22.
|
||||||
|
# Sources:
|
||||||
|
# - http://no.wikipedia.org/wiki/Offentlig_fridag
|
||||||
|
# - http://www.timeanddate.com/norsk/kalender.html
|
||||||
|
---
|
||||||
|
months:
|
||||||
|
0:
|
||||||
|
- name: Fastelavn
|
||||||
|
regions: ["no"]
|
||||||
|
function: easter(year)-49
|
||||||
|
type: informal
|
||||||
|
- name: Palmesøndag
|
||||||
|
regions: ["no"]
|
||||||
|
function: easter(year)-7
|
||||||
|
- name: Skjærtorsdag
|
||||||
|
regions: ["no"]
|
||||||
|
function: easter(year)-3
|
||||||
|
- name: Langfredag
|
||||||
|
regions: ["no"]
|
||||||
|
function: easter(year)-2
|
||||||
|
- name: 1. påskedag
|
||||||
|
regions: ["no"]
|
||||||
|
function: easter(year)
|
||||||
|
- name: 2. påskedag
|
||||||
|
regions: ["no"]
|
||||||
|
function: easter(year)+1
|
||||||
|
- name: Kristi Himmelfartsdag
|
||||||
|
regions: ["no"]
|
||||||
|
function: easter(year)+39
|
||||||
|
- name: 1. pinsedag
|
||||||
|
regions: ["no"]
|
||||||
|
function: easter(year)+49
|
||||||
|
- name: 2. pinsedag
|
||||||
|
regions: ["no"]
|
||||||
|
function: easter(year)+50
|
||||||
|
1:
|
||||||
|
- name: Nyttårsdag
|
||||||
|
regions: ["no"]
|
||||||
|
mday: 1
|
||||||
|
5:
|
||||||
|
- name: 1. mai
|
||||||
|
regions: ["no"]
|
||||||
|
mday: 1
|
||||||
|
- name: 17. mai
|
||||||
|
regions: ["no"]
|
||||||
|
mday: 17
|
||||||
|
12:
|
||||||
|
- name: Julaften
|
||||||
|
regions: ["no"]
|
||||||
|
mday: 24
|
||||||
|
type: informal
|
||||||
|
- name: 1. juledag
|
||||||
|
regions: ["no"]
|
||||||
|
mday: 25
|
||||||
|
- name: 2. juledag
|
||||||
|
regions: ["no"]
|
||||||
|
mday: 26
|
||||||
|
- name: Nyttårsaften
|
||||||
|
regions: ["no"]
|
||||||
|
mday: 31
|
||||||
|
type: informal
|
||||||
|
tests: |
|
||||||
|
{Date.civil(2010,1,1) => 'Nyttårsdag',
|
||||||
|
Date.civil(2010,5,1) => '1. mai',
|
||||||
|
Date.civil(2010,5,17) => '17. mai',
|
||||||
|
Date.civil(2010,12,24) => 'Julaften',
|
||||||
|
Date.civil(2010,12,25) => '1. juledag',
|
||||||
|
Date.civil(2010,12,26) => '2. juledag',
|
||||||
|
Date.civil(2010,12,31) => 'Nyttårsaften',
|
||||||
|
Date.civil(2010,2,14) => 'Fastelavn',
|
||||||
|
Date.civil(2010,3,28) => 'Palmesøndag',
|
||||||
|
Date.civil(2010,4,1) => 'Skjærtorsdag',
|
||||||
|
Date.civil(2010,4,2) => 'Langfredag',
|
||||||
|
Date.civil(2010,4,4) => '1. påskedag',
|
||||||
|
Date.civil(2010,4,5) => '2. påskedag',
|
||||||
|
Date.civil(2010,5,13) => 'Kristi Himmelfartsdag',
|
||||||
|
Date.civil(2010,5,23) => '1. pinsedag',
|
||||||
|
Date.civil(2010,5,24) => '2. pinsedag'}.each do |date, name|
|
||||||
|
assert_equal name, Holidays.on(date, :no, :informal)[0][:name]
|
||||||
|
end
|
|
@ -1,7 +1,7 @@
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holiday gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/cz.yaml, data/dk.yaml, data/de.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/nl.yaml, data/pt.yaml
|
# Definitions loaded: data/cz.yaml, data/dk.yaml, data/de.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/nl.yaml, data/no.yaml, data/pt.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load them right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
|
@ -11,7 +11,7 @@ module Holidays
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# More definitions are available at http://code.dunae.ca/holidays.
|
||||||
module Europe # :nodoc:
|
module Europe # :nodoc:
|
||||||
DEFINED_REGIONS = [:cz, :dk, :de, :de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de_sn, :de_he, :de_st, :de_bb, :de_mv, :de_th, :es, :es_m, :es_cn, :es_cm, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_mu, :es_lo, :es_ib, :es_ga, :es_an, :es_ce, :es_o, :es_ex, :es_ar, :es_cl, :fr, :gb, :ie, :je, :gb_jsy, :gg, :gb_gsy, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :im, :gb_iom, :gb_con, :is, :it, :nl, :pt]
|
DEFINED_REGIONS = [:cz, :dk, :no, :de, :de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de_sn, :de_he, :de_st, :de_bb, :de_mv, :de_th, :es, :es_m, :es_cn, :es_cm, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_mu, :es_lo, :es_ib, :es_ga, :es_an, :es_ce, :es_o, :es_ex, :es_ar, :es_cl, :fr, :gb, :ie, :je, :gb_jsy, :gg, :gb_gsy, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :im, :gb_iom, :gb_con, :is, :it, :nl, :pt]
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
HOLIDAYS_BY_MONTH = {
|
||||||
5 => [{:mday => 1, :name => "Svátek práce", :regions => [:cz]},
|
5 => [{:mday => 1, :name => "Svátek práce", :regions => [:cz]},
|
||||||
|
@ -33,16 +33,18 @@ module Holidays
|
||||||
{:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]},
|
{:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]},
|
||||||
{:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
|
{:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
|
||||||
{:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]},
|
{:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]},
|
||||||
|
{:mday => 1, :name => "1. mai", :regions => [:no]},
|
||||||
|
{:mday => 17, :name => "17. mai", :regions => [:no]},
|
||||||
{:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]}],
|
{:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Velikonoční pondělí", :regions => [:cz]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Velikonoční pondělí", :regions => [:cz]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk, :no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk, :no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:dk, :no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Påskedag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Påskedag", :regions => [:dk]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:dk, :no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+26 }, :function_id => "easter(year)+26", :name => "Store Bededag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)+26 }, :function_id => "easter(year)+26", :name => "Store Bededag", :regions => [:dk]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk, :no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinsedag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinsedag", :regions => [:dk]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. Pinsedag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. Pinsedag", :regions => [:dk]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Karfreitag", :regions => [:de]},
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Karfreitag", :regions => [:de]},
|
||||||
|
@ -80,6 +82,10 @@ module Holidays
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Hemelvaartsdag", :regions => [:nl]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Hemelvaartsdag", :regions => [:nl]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinksteren", :regions => [:nl]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinksteren", :regions => [:nl]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pinksteren", :regions => [:nl]},
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pinksteren", :regions => [:nl]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skjærtorsdag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "1. påskedag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "1. pinsedag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. pinsedag", :regions => [:no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Carnaval", :regions => [:pt]},
|
{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Carnaval", :regions => [:pt]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:pt]},
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:pt]},
|
||||||
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:pt]},
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:pt]},
|
||||||
|
@ -120,14 +126,15 @@ module Holidays
|
||||||
{:mday => 1, :name => "Capodanno", :regions => [:it]},
|
{:mday => 1, :name => "Capodanno", :regions => [:it]},
|
||||||
{:mday => 6, :name => "Epifania", :regions => [:it]},
|
{:mday => 6, :name => "Epifania", :regions => [:it]},
|
||||||
{:mday => 1, :name => "Nieuwjaar", :regions => [:nl]},
|
{:mday => 1, :name => "Nieuwjaar", :regions => [:nl]},
|
||||||
|
{:mday => 1, :name => "Nyttårsdag", :regions => [:no]},
|
||||||
{:mday => 1, :name => "Ano Novo", :regions => [:pt]}],
|
{:mday => 1, :name => "Ano Novo", :regions => [:pt]}],
|
||||||
12 => [{:mday => 24, :name => "Štědrý den", :regions => [:cz]},
|
12 => [{:mday => 24, :name => "Štědrý den", :regions => [:cz]},
|
||||||
{:mday => 25, :name => "1. svátek vánoční", :regions => [:cz]},
|
{:mday => 25, :name => "1. svátek vánoční", :regions => [:cz]},
|
||||||
{:mday => 26, :name => "2. svátek vánoční", :regions => [:cz]},
|
{:mday => 26, :name => "2. svátek vánoční", :regions => [:cz]},
|
||||||
{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
|
{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
|
||||||
{:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
|
{:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
|
||||||
{:mday => 25, :name => "1. juledag", :regions => [:dk]},
|
{:mday => 25, :name => "1. juledag", :regions => [:dk, :no]},
|
||||||
{:mday => 26, :name => "2. juledag", :regions => [:dk]},
|
{:mday => 26, :name => "2. juledag", :regions => [:dk, :no]},
|
||||||
{:mday => 25, :name => "1. Weihnachtstag", :regions => [:de]},
|
{:mday => 25, :name => "1. Weihnachtstag", :regions => [:de]},
|
||||||
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:de]},
|
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:de]},
|
||||||
{:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
|
{:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
|
||||||
|
@ -149,6 +156,8 @@ module Holidays
|
||||||
{:mday => 5, :type => :informal, :name => "Sinterklaas", :regions => [:nl]},
|
{:mday => 5, :type => :informal, :name => "Sinterklaas", :regions => [:nl]},
|
||||||
{:mday => 25, :name => "Kerstmis", :regions => [:nl]},
|
{:mday => 25, :name => "Kerstmis", :regions => [:nl]},
|
||||||
{:mday => 26, :name => "Kerstmis", :regions => [:nl]},
|
{:mday => 26, :name => "Kerstmis", :regions => [:nl]},
|
||||||
|
{:mday => 24, :type => :informal, :name => "Julaften", :regions => [:no]},
|
||||||
|
{:mday => 31, :type => :informal, :name => "Nyttårsaften", :regions => [:no]},
|
||||||
{:mday => 1, :name => "Restauração da Independência", :regions => [:pt]},
|
{:mday => 1, :name => "Restauração da Independência", :regions => [:pt]},
|
||||||
{:mday => 8, :name => "Imaculada Conceição", :regions => [:pt]},
|
{:mday => 8, :name => "Imaculada Conceição", :regions => [:pt]},
|
||||||
{:mday => 25, :name => "Natal", :regions => [:pt]}],
|
{:mday => 25, :name => "Natal", :regions => [:pt]}],
|
||||||
|
|
39
lib/holidays/no.rb
Normal file
39
lib/holidays/no.rb
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
module Holidays
|
||||||
|
# This file is generated by the Ruby Holiday gem.
|
||||||
|
#
|
||||||
|
# Definitions loaded: data/no.yaml
|
||||||
|
#
|
||||||
|
# To use the definitions in this file, load them right after you load the
|
||||||
|
# Holiday gem:
|
||||||
|
#
|
||||||
|
# require 'holidays'
|
||||||
|
# require 'holidays/no'
|
||||||
|
#
|
||||||
|
# More definitions are available at http://code.dunae.ca/holidays.
|
||||||
|
module NO # :nodoc:
|
||||||
|
DEFINED_REGIONS = [:no]
|
||||||
|
|
||||||
|
HOLIDAYS_BY_MONTH = {
|
||||||
|
5 => [{:mday => 1, :name => "1. mai", :regions => [:no]},
|
||||||
|
{:mday => 17, :name => "17. mai", :regions => [:no]}],
|
||||||
|
0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skjærtorsdag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "1. påskedag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "1. pinsedag", :regions => [:no]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. pinsedag", :regions => [:no]}],
|
||||||
|
1 => [{:mday => 1, :name => "Nyttårsdag", :regions => [:no]}],
|
||||||
|
12 => [{:mday => 24, :type => :informal, :name => "Julaften", :regions => [:no]},
|
||||||
|
{:mday => 25, :name => "1. juledag", :regions => [:no]},
|
||||||
|
{:mday => 26, :name => "2. juledag", :regions => [:no]},
|
||||||
|
{:mday => 31, :type => :informal, :name => "Nyttårsaften", :regions => [:no]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
Holidays.merge_defs(Holidays::NO::DEFINED_REGIONS, Holidays::NO::HOLIDAYS_BY_MONTH)
|
|
@ -3,7 +3,7 @@ require 'holidays/europe'
|
||||||
|
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holiday gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/cz.yaml, data/dk.yaml, data/de.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/nl.yaml, data/pt.yaml
|
# Definitions loaded: data/cz.yaml, data/dk.yaml, data/de.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/nl.yaml, data/no.yaml, data/pt.yaml
|
||||||
class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
|
class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
|
||||||
|
|
||||||
def test_europe
|
def test_europe
|
||||||
|
@ -234,6 +234,25 @@ end
|
||||||
assert_equal name, Holidays.on(date, :nl, :informal)[0][:name]
|
assert_equal name, Holidays.on(date, :nl, :informal)[0][:name]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
{Date.civil(2010,1,1) => 'Nyttårsdag',
|
||||||
|
Date.civil(2010,5,1) => '1. mai',
|
||||||
|
Date.civil(2010,5,17) => '17. mai',
|
||||||
|
Date.civil(2010,12,24) => 'Julaften',
|
||||||
|
Date.civil(2010,12,25) => '1. juledag',
|
||||||
|
Date.civil(2010,12,26) => '2. juledag',
|
||||||
|
Date.civil(2010,12,31) => 'Nyttårsaften',
|
||||||
|
Date.civil(2010,2,14) => 'Fastelavn',
|
||||||
|
Date.civil(2010,3,28) => 'Palmesøndag',
|
||||||
|
Date.civil(2010,4,1) => 'Skjærtorsdag',
|
||||||
|
Date.civil(2010,4,2) => 'Langfredag',
|
||||||
|
Date.civil(2010,4,4) => '1. påskedag',
|
||||||
|
Date.civil(2010,4,5) => '2. påskedag',
|
||||||
|
Date.civil(2010,5,13) => 'Kristi Himmelfartsdag',
|
||||||
|
Date.civil(2010,5,23) => '1. pinsedag',
|
||||||
|
Date.civil(2010,5,24) => '2. pinsedag'}.each do |date, name|
|
||||||
|
assert_equal name, Holidays.on(date, :no, :informal)[0][:name]
|
||||||
|
end
|
||||||
|
|
||||||
{Date.civil(2008,1,1) => 'Ano Novo',
|
{Date.civil(2008,1,1) => 'Ano Novo',
|
||||||
Date.civil(2005,2,8) => 'Carnaval',
|
Date.civil(2005,2,8) => 'Carnaval',
|
||||||
Date.civil(2006,2,28) => 'Carnaval',
|
Date.civil(2006,2,28) => 'Carnaval',
|
||||||
|
|
29
test/defs/test_defs_no.rb
Normal file
29
test/defs/test_defs_no.rb
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
require File.dirname(__FILE__) + '/../test_helper'
|
||||||
|
require 'holidays/no'
|
||||||
|
|
||||||
|
# This file is generated by the Ruby Holiday gem.
|
||||||
|
#
|
||||||
|
# Definitions loaded: data/no.yaml
|
||||||
|
class NoDefinitionTests < Test::Unit::TestCase # :nodoc:
|
||||||
|
|
||||||
|
def test_no
|
||||||
|
{Date.civil(2010,1,1) => 'Nyttårsdag',
|
||||||
|
Date.civil(2010,5,1) => '1. mai',
|
||||||
|
Date.civil(2010,5,17) => '17. mai',
|
||||||
|
Date.civil(2010,12,24) => 'Julaften',
|
||||||
|
Date.civil(2010,12,25) => '1. juledag',
|
||||||
|
Date.civil(2010,12,26) => '2. juledag',
|
||||||
|
Date.civil(2010,12,31) => 'Nyttårsaften',
|
||||||
|
Date.civil(2010,2,14) => 'Fastelavn',
|
||||||
|
Date.civil(2010,3,28) => 'Palmesøndag',
|
||||||
|
Date.civil(2010,4,1) => 'Skjærtorsdag',
|
||||||
|
Date.civil(2010,4,2) => 'Langfredag',
|
||||||
|
Date.civil(2010,4,4) => '1. påskedag',
|
||||||
|
Date.civil(2010,4,5) => '2. påskedag',
|
||||||
|
Date.civil(2010,5,13) => 'Kristi Himmelfartsdag',
|
||||||
|
Date.civil(2010,5,23) => '1. pinsedag',
|
||||||
|
Date.civil(2010,5,24) => '2. pinsedag'}.each do |date, name|
|
||||||
|
assert_equal name, Holidays.on(date, :no, :informal)[0][:name]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue