From 640aa45956675907c100756989d6f5050e5126e6 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 3 Jan 2016 00:40:05 +0000 Subject: [PATCH] fix comedy bug where dates in timestamps were spectacularly wrong --- src/DateUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DateUtils.js b/src/DateUtils.js index fe363586ab..3b11b82ccf 100644 --- a/src/DateUtils.js +++ b/src/DateUtils.js @@ -35,10 +35,10 @@ module.exports = { return days[date.getDay()] + " " + pad(date.getHours()) + ':' + pad(date.getMinutes()); } else if (now.getFullYear() === date.getFullYear()) { - return days[date.getDay()] + ", " + months[date.getMonth()] + " " + (date.getDay()+1) + " " + pad(date.getHours()) + ':' + pad(date.getMinutes()); + return days[date.getDay()] + ", " + months[date.getMonth()] + " " + date.getDate() + " " + pad(date.getHours()) + ':' + pad(date.getMinutes()); } else { - return days[date.getDay()] + ", " + months[date.getMonth()] + " " + (date.getDay()+1) + " " + date.getFullYear() + " " + pad(date.getHours()) + ':' + pad(date.getMinutes()); + return days[date.getDay()] + ", " + months[date.getMonth()] + " " + date.getDate() + " " + date.getFullYear() + " " + pad(date.getHours()) + ':' + pad(date.getMinutes()); } } }