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
e68c951e
Commit
e68c951e
authored
Jul 03, 2014
by
Johannes Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added express test
parent
7de0ed18
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
19 deletions
+1
-19
timeUtils.js
lib/timeUtils.js
+0
-18
index.js
serverTest/routes/index.js
+1
-1
No files found.
lib/timeUtils.js
View file @
e68c951e
...
...
@@ -117,24 +117,6 @@ function cyclicFromTillDay(daySpan, noInMonth, timeSpan, dateSpan, epochSpan) {
return
result
;
}
/*function _cyclicFromTillDayOld(dayFrom, dayTill, noInMonth, timeFrom, timeUntil, epochStart, epochEnd) {
var firstDays = cyclic(dayFrom, noInMonth, timeFrom, timeUntil, epochStart, epochEnd);
var result = firstDays.slice();
for(var offset = 1; offset <= dayTill - dayFrom; offset++) {
for(var i = 0; i < firstDays.length; i++) {
var start = new Date(firstDays[i][0]);
var end = new Date(firstDays[i][1]);
start.setDate(start.getDate() + offset);
end.setDate(end.getDate() + offset);
if(end <= epochEnd)
result.push([start, end]);
}
}
sort(result);
return result;
}*/
function
_getNextNoInMonthOccurence
(
day
,
startDate
,
noInMonth
)
{
startDate
=
new
Date
(
startDate
);
...
...
serverTest/routes/index.js
View file @
e68c951e
...
...
@@ -6,7 +6,7 @@ router.get('/', function(req, res) {
var
time0
=
process
.
hrtime
();
var
dateString
=
req
.
query
.
date
;
var
now
;
if
(
dateString
.
length
==
8
)
{
if
(
dateString
&&
dateString
.
length
==
8
)
{
var
year
=
parseInt
(
dateString
.
slice
(
0
,
4
));
var
month
=
parseInt
(
dateString
.
slice
(
4
,
6
));
var
date
=
parseInt
(
dateString
.
slice
(
6
,
8
));
...
...
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