Fixed: Various UI fixes

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick
2018-09-06 20:59:49 -04:00
parent 2667d3ac21
commit 034ef2ad99
3 changed files with 26 additions and 18 deletions
@@ -10,6 +10,12 @@ function getRelativeDate(date, shortDateFormat, showRelativeDates, { timeFormat,
return null;
}
const isTodayDate = isToday(date);
if (isTodayDate && timeForToday && timeFormat) {
return formatTime(date, timeFormat, { includeMinuteZero: true, includeSeconds });
}
if (!showRelativeDates) {
return moment(date).format(shortDateFormat);
}
@@ -18,11 +24,7 @@ function getRelativeDate(date, shortDateFormat, showRelativeDates, { timeFormat,
return 'Yesterday';
}
if (isToday(date)) {
if (timeForToday && timeFormat) {
return formatTime(date, timeFormat, { includeMinuteZero: true, includeSeconds });
}
if (isTodayDate) {
return 'Today';
}