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
3c476ee4
Commit
3c476ee4
authored
Jun 23, 2014
by
Johannes Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial
parent
934b98ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
app.js
app.js
+13
-0
No files found.
app.js
View file @
3c476ee4
...
@@ -38,9 +38,22 @@ function removeOverlaps(interval) {
...
@@ -38,9 +38,22 @@ function removeOverlaps(interval) {
}
}
function
andOperator
(
interval1
,
interval2
)
{
function
andOperator
(
interval1
,
interval2
)
{
var
result
=
[];
var
i
=
0
;
var
i
=
0
;
var
j
=
0
;
var
j
=
0
;
while
(
i
<
interval1
.
length
&&
j
<
interval2
.
length
)
{
while
(
i
<
interval1
.
length
&&
j
<
interval2
.
length
)
{
var
start1
=
interval1
[
i
][
0
];
var
end1
=
interval1
[
i
][
1
];
var
start2
=
interval2
[
j
][
0
];
var
end2
=
interval2
[
j
][
1
];
//detect overlap
if
(
end2
<
start1
)
j
++
;
else
if
(
end1
<
start2
)
i
++
;
}
}
}
}
...
...
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