Update relative time text for a change updated to say "just now"
Previously, formatted dates would say "a few seconds ago" if the timestamp was less than a minute in the past. This change updates the text to say "just now" instead. Bug: Issue 4423 Change-Id: Ie8e4070ce3c1c57fc23bb3de4c110423a563ff19
This commit is contained in:
@@ -111,7 +111,12 @@
|
||||
var date = moment(util.parseDate(dateStr));
|
||||
if (!date.isValid()) { return ''; }
|
||||
if (relative) {
|
||||
return date.fromNow();
|
||||
var dateFromNow = date.fromNow();
|
||||
if (dateFromNow === 'a few seconds ago') {
|
||||
return 'just now';
|
||||
} else {
|
||||
return dateFromNow;
|
||||
}
|
||||
}
|
||||
var now = new Date();
|
||||
var format = TimeFormats.MONTH_DAY_YEAR;
|
||||
|
||||
Reference in New Issue
Block a user