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
3b013462
Commit
3b013462
authored
Oct 21, 2014
by
Johannes Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added maybe ohours for indexuptater
parent
0127b96b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
index.js
index.js
+13
-6
No files found.
index.js
View file @
3b013462
...
...
@@ -5,16 +5,23 @@ module.exports = function (config) {
var
dateArray
=
require
(
'./lib/dateArray'
);
var
dateView
=
require
(
'./lib/dateView'
);
function
getOHIndex
(
incl
,
excl
,
date
,
plz
,
cb
)
{
function
getOHIndex
(
incl
,
excl
,
maybe
,
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
)
{
dateArray
(
epochSpan
).
getData
([
incl
,
excl
,
maybe
],
plz
,
function
(
err
,
result
)
{
if
(
err
)
return
cb
(
err
);
result
=
result
.
intervals
;
var
fResult
=
result
.
filter
(
function
(
elem
)
{
return
elem
[
0
].
getTime
()
>=
date
.
getTime
();
});
var
resultSure
=
result
.
intervals
;
var
resultMaybe
=
result
.
maybeIntervals
;
var
fResult
=
{
sure
:
resultSure
.
filter
(
function
(
elem
)
{
return
elem
[
0
].
getTime
()
>=
date
.
getTime
();
}),
maybe
:
resultMaybe
.
filter
(
function
(
elem
)
{
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