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
81ef072c
Commit
81ef072c
authored
Jul 01, 2014
by
Johannes Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created lib folder
parent
60459d00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
35 deletions
+2
-35
.gitignore
.gitignore
+2
-1
test.js
test.js
+0
-34
No files found.
.gitignore
View file @
81ef072c
.idea/
.idea/
node_modules
node_modules
\ No newline at end of file
bower_components
\ No newline at end of file
test.js
deleted
100644 → 0
View file @
60459d00
var
tmUtils
=
require
(
'./lib/timeUtils'
);
//gibt zu betrachtenden Zeitraum an.
var
_epochStart
=
new
Date
(
2014
,
5
,
24
,
0
);
var
_epochEnd
=
new
Date
(
_epochStart
.
getTime
()
+
20
*
24
*
3600000
);
console
.
log
(
"epochStart"
,
_epochStart
);
console
.
log
(
"epochEnd "
,
_epochEnd
);
//test
//var c = [[new Date(2014, 5, 23, 13), new Date(2014, 6, 6, 10)]];
//var x = andNotOperator(a, b);
//var y = andNotOperator(a, c);
//console.log(y);
//var workday = standardFromTillDay(1, 6, {h: 9, m: 0}, {h: 11, m: 45}, _epochStart, _epochEnd, 14);
//console.log(workday);
var
t1
=
tmUtils
.
cyclicFromTillDay
([
1
,
1
],
1
,
[{
h
:
9
,
m
:
0
},
{
h
:
0
,
m
:
0
}],
[
_epochStart
,
_epochEnd
]);
var
t2
=
tmUtils
.
cyclicFromTillDay
([
2
,
2
],
1
,
[{
h
:
0
,
m
:
0
},
{
h
:
18
,
m
:
29
}],
[
_epochStart
,
_epochEnd
]);
t1
=
tmUtils
.
standardFromTillDay
([
3
,
3
],
[{
h
:
21
,
m
:
0
},
{
h
:
0
,
m
:
0
}],
[
_epochStart
,
_epochEnd
],
7
);
t2
=
tmUtils
.
standardFromTillDay
([
4
,
4
],
[{
h
:
0
,
m
:
0
},
{
h
:
18
,
m
:
0
}],
[
_epochStart
,
_epochEnd
],
7
);
console
.
log
(
t1
);
console
.
log
(
t2
);
var
singleDay
=
[
tmUtils
.
singleDay
(
new
Date
())];
console
.
log
(
singleDay
);
var
t
=
tmUtils
.
orOperator
([
t1
,
t2
,
singleDay
]);
console
.
log
(
t
);
console
.
log
(
tmUtils
.
mergeOverlaps
(
t
));
console
.
log
(
tmUtils
.
orOperator
([
t
,
t2
]));
\ 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