Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
opening-hours
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
regionalkauf
opening-hours
Commits
7f271949
Commit
7f271949
authored
Jul 08, 2014
by
Johannes Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added Mocha Test
parent
aaa10e49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
17 deletions
+66
-17
easterSunday.js
lib/easterSunday.js
+15
-0
holidayMapping.json
lib/holidayMapping.json
+51
-17
No files found.
lib/easterSunday.js
0 → 100644
View file @
7f271949
function
getEasterSunday
(
year
)
{
var
k
=
year
/
100
>>
0
;
var
m
=
15
+
((
3
*
k
+
3
)
/
4
>>
0
)
-
((
8
*
k
+
13
)
/
25
>>
0
);
var
s
=
2
-
((
3
*
k
+
3
)
/
4
>>
0
);
var
a
=
year
%
19
;
var
d
=
(
19
*
a
+
m
)
%
30
;
var
r
=
(
d
+
a
/
11
>>
0
)
/
29
>>
0
;
var
og
=
(
21
+
d
-
r
);
var
sz
=
7
-
(
year
+
(
year
/
4
>>
0
)
+
s
)
%
7
;
var
oe
=
7
-
(
og
-
sz
)
%
7
;
var
os
=
og
+
oe
;
return
new
Date
(
year
,
2
,
os
);
}
module
.
exports
.
getEasterSunday
=
getEasterSunday
;
\ No newline at end of file
lib/holidayMapping.json
View file @
7f271949
...
@@ -19,24 +19,58 @@
...
@@ -19,24 +19,58 @@
"122"
:
"Erster Weihnachtstag"
,
"122"
:
"Erster Weihnachtstag"
,
"123"
:
"Zweiter Weihnachtstag"
"123"
:
"Zweiter Weihnachtstag"
},
},
"sureHolidays"
:
[
"101"
,
"103"
,
"121"
,
"122"
,
"123"
,
"501"
,
"
808"
,
"
301"
,
"302"
,
"303"
,
"502"
,
"601"
,
"602"
],
"sureHolidays"
:
[
"101"
,
"103"
,
"121"
,
"122"
,
"123"
,
"501"
,
"301"
,
"302"
,
"303"
,
"502"
,
"601"
,
"602"
],
"specificHolidays"
:
[
"1"
,
"106"
,
"111"
,
"131"
,
"2"
,
"815"
],
"specificHolidays"
:
[
"1"
,
"106"
,
"111"
,
"131"
,
"2"
,
"815"
],
"region"
:
{
"region"
:
{
"BW"
:
[
"106"
,
"1"
,
"111"
],
"BW"
:
{
"BY"
:
[
"106"
,
"1"
,
"815"
,
"111"
],
"default"
:
[
"106"
,
"1"
,
"111"
]
"BE"
:
[],
},
"BB"
:
[
"131"
],
"BY"
:
{
"HB"
:
[],
"default"
:
[
"106"
,
"1"
,
"815"
,
"111"
],
"HH"
:
[],
"kath"
:
[
"815"
],
"HE"
:
[
"1"
],
"augsburg"
:
[
"808"
]
"MV"
:
[
"131"
],
},
"NI"
:
[],
"BE"
:
{
"NW"
:
[
"1"
,
"111"
],
"default"
:
[]
"RP"
:
[
"1"
,
"111"
],
},
"SL"
:
[
"1"
,
"815"
,
"111"
],
"BB"
:
{
"SN"
:
[
"1"
,
"131"
,
"2"
],
"default"
:
[
"131"
]
"ST"
:
[
"106"
,
"131"
],
},
"SH"
:
[],
"HB"
:
{
"TH"
:
[
"1"
,
"131"
]
"default"
:
[]
},
"HH"
:
{
"default"
:
[]
},
"HE"
:
{
"default"
:
[
"1"
]
},
"MV"
:
{
"default"
:
[
"131"
]
},
"NI"
:
{
"default"
:
[]
},
"NW"
:
{
"default"
:
[
"1"
,
"111"
]
},
"RP"
:
{
"default"
:
[
"1"
,
"111"
]
},
"SL"
:
{
"default"
:
[
"1"
,
"815"
,
"111"
]
},
"SN"
:
{
"default"
:
[
"1"
,
"131"
,
"2"
]
},
"ST"
:
{
"default"
:
[
"106"
,
"131"
]
},
"SH"
:
{
"default"
:
[]
},
"TH"
:
{
"default"
:
[
"1"
,
"131"
]
}
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment