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
3df4c22d
Commit
3df4c22d
authored
Jul 15, 2014
by
Johannes Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added index.js for external usage
parent
1f8c86a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
index.js
index.js
+2
-1
No files found.
index.js
View file @
3df4c22d
...
...
@@ -2,12 +2,13 @@ var dateArray = require('./lib/dateArray');
var
dateView
=
require
(
'./lib/dateView'
);
function
getOHIndex
(
incl
,
excl
,
date
,
plz
,
cb
)
{
date
=
new
Date
(
date
.
getFullYear
(),
date
.
getMonth
(),
date
.
getDate
());
var
epochSpan
=
[
new
Date
(
date
.
getFullYear
(),
date
.
getMonth
(),
date
.
getDate
()
-
7
),
new
Date
(
date
.
getFullYear
(),
date
.
getMonth
(),
date
.
getDate
()
+
2
)];
dateArray
(
epochSpan
).
getData
([
incl
,
excl
],
plz
,
function
(
err
,
result
)
{
if
(
err
)
return
cb
(
err
);
var
fResult
=
result
.
filter
(
function
(
elem
)
{
return
elem
[
0
].
getTime
>=
date
.
getTime
();
return
elem
[
0
].
getTime
()
>=
date
.
getTime
();
});
cb
(
null
,
fResult
);
...
...
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