Last active
August 29, 2015 13:55
-
-
Save lsauer/8707483 to your computer and use it in GitHub Desktop.
JSON: Holidays in Austria's provinces - Austrian provinces ( Österreichische Feiertage )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"B": "Burgenland", | |
"K": "Kärnten", | |
"N": "Niederösterreich", | |
"O": "Oberöstereich", | |
"S": "Salzburg", | |
"St": "Steiermark", | |
"T": "Tirol", | |
"V": "Vorarlberg", | |
"W": "Wien" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// lsauer.com, 2014 | |
// description: JSON list of austrian holidays and their approval in a given province | |
// source: wikipedia, verified | |
// http://de.wikipedia.org/wiki/Feiertage_in_%C3%96sterreich | |
// http://www.feiertage-oesterreich.at/2014/ | |
{ | |
"1": { | |
"dayname": "Neujahr", | |
"daydate": "1. Jänner", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"2": { | |
"dayname": "Heilige Drei Könige", | |
"daydate": "6. Jänner", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"3": { | |
"dayname": "Josef", | |
"daydate": "19. März", | |
"province": { | |
"B": 0, | |
"K": 1, | |
"N": 0, | |
"O": 0, | |
"S": 0, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 0 | |
} | |
}, | |
"4": { | |
"dayname": "Karfreitag", | |
"daydate": "beweglich (Ostersonntag - 2 Tage)", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"5": { | |
"dayname": "Ostermontag", | |
"daydate": "beweglich (Ostersonntag + 1 Tag)", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"6": { | |
"dayname": "Staatsfeiertag", | |
"daydate": "1. Mai", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"7": { | |
"dayname": "Florian", | |
"daydate": "4. Mai", | |
"province": { | |
"B": 0, | |
"K": 0, | |
"N": 0, | |
"O": 1, | |
"S": 0, | |
"St": 0, | |
"T": 0, | |
"V": 0, | |
"W": 0 | |
} | |
}, | |
"8": { | |
"dayname": "Christi Himmelfahrt", | |
"daydate": "beweglich (Ostersonntag + 39 Tage)", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"9": { | |
"dayname": "Pfingstmontag", | |
"daydate": "beweglich (Ostersonntag + 50 Tage)", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"10": { | |
"dayname": "Fronleichnam", | |
"daydate": "beweglich (Ostersonntag + 60 Tage)", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"11": { | |
"dayname": "Mariä Himmelfahrt", | |
"daydate": "15. August 7)", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"12": { | |
"dayname": "Rupert", | |
"daydate": "24. September", | |
"province": { | |
"B": 0, | |
"K": 0, | |
"N": 0, | |
"O": 0, | |
"S": 1, | |
"St": 0, | |
"T": 0, | |
"V": 0, | |
"W": 0 | |
} | |
}, | |
"13": { | |
"dayname": "Tag der Volksabstimmung", | |
"daydate": "10. Oktober", | |
"province": { | |
"B": 0, | |
"K": 1, | |
"N": 0, | |
"O": 0, | |
"S": 0, | |
"St": 0, | |
"T": 0, | |
"V": 0, | |
"W": 0 | |
} | |
}, | |
"14": { | |
"dayname": "Nationalfeiertag", | |
"daydate": "26. Oktober", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"15": { | |
"dayname": "Allerheiligen", | |
"daydate": "1. November", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"16": { | |
"dayname": "Martin", | |
"daydate": "11. November", | |
"province": { | |
"B": 1, | |
"K": 0, | |
"N": 0, | |
"O": 0, | |
"S": 0, | |
"St": 0, | |
"T": 0, | |
"V": 0, | |
"W": 0 | |
} | |
}, | |
"17": { | |
"dayname": "Leopold", | |
"daydate": "15. November", | |
"province": { | |
"B": 0, | |
"K": 0, | |
"N": 1, | |
"O": 0, | |
"S": 0, | |
"St": 0, | |
"T": 0, | |
"V": 0, | |
"W": 1 | |
} | |
}, | |
"18": { | |
"dayname": "Mariä Empfängnis", | |
"daydate": "8. Dezember", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"19": { | |
"dayname": "Heiliger Abend", | |
"daydate": "24. Dezember", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"20": { | |
"dayname": "Christtag", | |
"daydate": "25. Dezember", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"21": { | |
"dayname": "Stefanitag", | |
"daydate": "26. Dezember", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
}, | |
"22": { | |
"dayname": "Silvester", | |
"daydate": "31. Dezember", | |
"province": { | |
"B": 1, | |
"K": 1, | |
"N": 1, | |
"O": 1, | |
"S": 1, | |
"St": 1, | |
"T": 1, | |
"V": 1, | |
"W": 1 | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//lsauer.com, 2014 | |
//Extracting holidays specific to each province | |
//Source: http://de.wikipedia.org/wiki/Feiertage_in_%C3%96sterreich | |
var out = {}; | |
//without jQuery use: | |
//Array.prototype.constructor.apply(this,document.querySelectorAll('#mw-content-text > .prettytable tr')). | |
//forEach(function(e,i){...}) | |
$('#mw-content-text > .prettytable tr').each( | |
function(i,e){ | |
if(!e) return; | |
try{ | |
if(parseInt(e.querySelector('td:nth-child(2) a').innerText) == NaN) return; | |
var _tdall = e.querySelectorAll('td'); | |
var idx = 2; | |
out[i] = { | |
dayname : e.querySelector('td:nth-child(1) a').innerText, | |
daydate : e.querySelector('td:nth-child(2)').innerText, | |
province : { | |
'B': _tdall[idx++].innerText.trim().length, | |
'K': _tdall[idx++].innerText.trim().length, | |
'N': _tdall[idx++].innerText.trim().length, | |
'O': _tdall[idx++].innerText.trim().length, | |
'S': _tdall[idx++].innerText.trim().length, | |
'St': _tdall[idx++].innerText.trim().length, | |
'T': _tdall[idx++].innerText.trim().length, | |
'V': _tdall[idx++].innerText.trim().length, | |
'W': _tdall[idx++].innerText.trim().length, | |
} | |
}; | |
}catch(exc){ console.log("Out of Index or null-reference?", exc); } | |
} | |
); | |
JSON.stringify(out, " ", 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment