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.

This commit is contained in:
Thorsten Eckel 2019-01-02 17:05:30 +01:00
parent 0f484d0ed5
commit f289d99fbf

View file

@ -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;
}