From f289d99fbf736afe29c93d43444ecbe6abeaa9ab Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 2 Jan 2019 17:05:30 +0100 Subject: [PATCH] Fixed failing CI: Date comparison checks for hour format 'HH' (as described in all comments) while App.PrettyDate.humanTime generates hour format 'H' for absolute type date strings. --- public/assets/tests/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/assets/tests/ui.js b/public/assets/tests/ui.js index 87f4815cb..cf50246d0 100644 --- a/public/assets/tests/ui.js +++ b/public/assets/tests/ui.js @@ -348,9 +348,9 @@ test("check pretty date", function() { if (diff < (60 * 60 * 24 * 6)) string = weekday + ' ' + date.getHours() + ':' + (date.getMinutes() < 10 ? '0':'') + date.getMinutes() else if (current.getYear() == date.getYear()) - string = weekday + ' ' + date.getDate() + '. ' + month + ' ' + (H < 10 ? '0':'') + H + ":" + (M < 10 ? '0':'') + M + string = weekday + ' ' + date.getDate() + '. ' + month + ' ' + H + ":" + (M < 10 ? '0':'') + M else - string = weekday + ' ' + (m < 10 ? '0':'') + m + '/' + (d < 10 ? '0':'') + d + '/' + (yfull) + ' ' + (H < 10 ? '0':'') + H + ":" + (M < 10 ? '0':'') + M + string = weekday + ' ' + (m < 10 ? '0':'') + m + '/' + (d < 10 ? '0':'') + d + '/' + (yfull) + ' ' + H + ":" + (M < 10 ? '0':'') + M return string; }