Commit 81ef072c authored by Johannes Bill's avatar Johannes Bill

created lib folder

parent 60459d00
.idea/ .idea/
node_modules node_modules
\ No newline at end of file bower_components
\ No newline at end of file
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment