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
66a0e602
Commit
66a0e602
authored
Nov 18, 2014
by
Johannes Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stupid denkfehler
parent
0d5b1354
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
dateArray.js
lib/dateArray.js
+1
-7
dataBaseQuery.js
serverTest/dataBaseQuery.js
+2
-2
No files found.
lib/dateArray.js
View file @
66a0e602
...
...
@@ -222,13 +222,7 @@ function wrapper(_epochSpan) {
return
[
epochSpan
];
}
var
newYear
=
0
;
if
(
end
[
1
]
<
start
[
1
])
{
newYear
=
1
;
var
temp
=
start
;
start
=
end
;
end
=
temp
;
}
var
newYear
=
(
end
[
1
]
<
start
[
1
])?
1
:
0
;
var
startDate
=
new
Date
(
startYear
,
start
[
1
]
-
1
,
start
[
0
]);
var
endDate
=
new
Date
(
startYear
+
newYear
,
end
[
1
]
-
1
,
end
[
0
]
+
1
);
...
...
serverTest/dataBaseQuery.js
View file @
66a0e602
...
...
@@ -20,7 +20,7 @@ module.exports.getData = function (now, cb) {
// dateArray.setEpocheSpan(epocheSpan);
// connection.query('SELECT name, elements FROM cms_zoo_item WHERE type in ("pos", "company") ORDER BY id', function (err, rows) {
connection
.
query
(
'SELECT name, type, elements FROM cms_zoo_item WHERE id in (
1871
)'
,
function
(
err
,
rows
)
{
connection
.
query
(
'SELECT name, type, elements FROM cms_zoo_item WHERE id in (
832
)'
,
function
(
err
,
rows
)
{
console
.
error
(
err
);
console
.
log
(
rows
.
length
);
var
result
=
[];
...
...
@@ -38,7 +38,7 @@ module.exports.getData = function (now, cb) {
var
name
=
rows
[
i
].
name
;
var
idx
=
i
;
dateArray
(
epocheSpan
).
getData
(
hours
,
plz
,
function
(
err
,
dataObj
)
{
//
console.log(dataObj);
console
.
log
(
dataObj
);
if
(
err
)
{
console
.
log
(
name
,
err
);
}
...
...
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