Changed /-s to "-" in date format

This commit is contained in:
mrfry 2020-11-16 20:23:38 +01:00
parent 0b1bfcbc31
commit 3e2b76f75b
2 changed files with 4 additions and 15 deletions

View file

@ -90,9 +90,9 @@ function AddVisitStat(name, subj, newQuestions, allQuestions) {
var date = new Date()
const now =
date.getFullYear() +
'/' +
'-' +
('0' + (date.getMonth() + 1)).slice(-2) +
'/' +
'-' +
('0' + date.getDate()).slice(-2)
if (vData[now] === undefined) {
vData[now] = {}

View file

@ -47,7 +47,7 @@ const uvStatsFile = 'stats/uvstats'
const nologFile = './nolog'
const colors = ['green', 'red', 'yellow', 'blue', 'magenta', 'cyan']
var logFileName = getDayString()
var logFileName = utils.GetDateString(true)
const writeInterval = 10
const debugLevel = parseInt(process.env.NS_LOGLEVEL) || 0
@ -61,18 +61,7 @@ let writes = 0
let noLogips = []
function setNewLogfileName() {
logFileName = getDayString()
}
function getDayString() {
const date = new Date()
return (
date.getFullYear() +
'_' +
('0' + (date.getMonth() + 1)).slice(-2) +
'_' +
('0' + date.getDate()).slice(-2)
)
logFileName = utils.GetDateString(true)
}
function GetDateString() {