70 lines
1.6 KiB
YAML
70 lines
1.6 KiB
YAML
# Swedish holiday definitions for the Ruby Holiday gem.
|
||
#
|
||
# Updated: 2008-11-28.
|
||
# Sources:
|
||
# - http://en.wikipedia.org/wiki/Holidays_in_Sweden
|
||
# - http://www.worldtravelguide.net/country/269/public_holidays/Europe/Sweden.html
|
||
# - http://hem.passagen.se/farila/midsum.htm
|
||
# - http://www.timeanddate.com/calendar/?country=21
|
||
---
|
||
months:
|
||
0:
|
||
- name: Långfredagen
|
||
regions: [se]
|
||
function: easter(year)-2
|
||
- name: Påskdagen
|
||
regions: [se]
|
||
function: easter(year)
|
||
- name: Annandag påsk
|
||
regions: [se]
|
||
function: easter(year)+1
|
||
- name: Kristi himmelsfärdsdag # Ascension Day
|
||
regions: [se]
|
||
function: easter(year)+39
|
||
- name: Pingstdagen # Whitsunday
|
||
regions: [se]
|
||
function: easter(year)+49
|
||
- name: Alla helgons dag # All Saint's Day
|
||
regions: [se]
|
||
function: se_alla_helgons_dag(year)
|
||
1:
|
||
- name: Nyårsdagen
|
||
regions: [se]
|
||
mday: 1
|
||
- name: Trettondedag jul
|
||
regions: [se]
|
||
mday: 6
|
||
5:
|
||
- name: Första maj
|
||
regions: [se]
|
||
mday: 1
|
||
6:
|
||
- name: Nationaldagen
|
||
regions: [se]
|
||
mday: 6
|
||
- name: Midsommardagen
|
||
regions: [se]
|
||
function: se_midsommardagen(year)
|
||
12:
|
||
- name: Juldagen
|
||
regions: [se]
|
||
mday: 25
|
||
- name: Annandag jul
|
||
regions: [se]
|
||
mday: 26
|
||
methods:
|
||
se_midsommardagen: |
|
||
# Sweden: Mid-summer (Saturday between June 20–26)
|
||
def self.se_midsommardagen(year)
|
||
date = Date.civil(year,6,20)
|
||
date += (6 - date.wday)
|
||
date
|
||
end
|
||
se_alla_helgons_dag: |
|
||
# Sweden: All Saint's Day (Saturday between Oct 31 and Nov 6)
|
||
def self.se_alla_helgons_dag(year)
|
||
date = Date.civil(year,10,31)
|
||
date += (6 - date.wday)
|
||
date
|
||
end
|