mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 18:38:15 +01:00
Use momentjs for timestamp localization
Let momentjs handle proper pluralization of relative times. This comes at the sacrifice of displaying 'minutes' in the conversation list timestamp rather than 'min'. Note that we don't use moment's fromNow instance method so as to preserve the rounding logic that matches the Android client. // FREEBIE
This commit is contained in:
@@ -46,7 +46,7 @@ describe('TimestampView', function() {
|
||||
|
||||
// check recent timestamps
|
||||
checkDiff(30, 'now', 'now'); // 30 seconds
|
||||
checkDiff(40*60, '40 min', '40 minutes ago');
|
||||
checkDiff(40*60, '40 minutes', '40 minutes ago');
|
||||
checkDiff(60*60, '1 hour', '1 hour ago');
|
||||
checkDiff(125*60, '2 hours', '2 hours ago');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user