updated today.js

This commit is contained in:
martind2000 2016-02-14 11:39:47 +00:00
parent d33143394c
commit 47855eef19

View File

@ -15,7 +15,7 @@ var todayCache = {
history: [],
today : ''
},
expire: ((60 * 1000) * 60) * 1
expire: ((60 * 1000) * 60)
};
var trainList = [
@ -62,10 +62,12 @@ function dayNumber() {
var start = new Date(now.getFullYear(), 0, 0);
var diff = now - start;
var oneDay = 1000 * 60 * 60 * 24;
var day = Math.floor(diff / oneDay);
return day;
return Math.floor(diff / oneDay);
}
/**
* @return {number}
*/
function DayDiff(CurrentDate)
{
var TYear=CurrentDate.getFullYear();
@ -99,7 +101,7 @@ module.exports = {
res.render('pages/today', todayCache);
},
getTodayDate: function() {
var s,d = new Date();;
var s, d = new Date();
todayCache.data.history = [];
s = '<strong>' + dateFormat(d, "mmmm d") + '</strong> - ';