mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
don't show time less than 0
This commit is contained in:
@@ -25,7 +25,9 @@ export function timeSince(date) {
|
||||
if (interval > 0.9) {
|
||||
return interval < 2 ? interval + ' min ago' : interval + ' min ago';
|
||||
}
|
||||
return Math.floor(seconds) + ' secs ago';
|
||||
return Math.floor(seconds) < 0
|
||||
? '0 secs ago'
|
||||
: Math.floor(seconds) + ' secs ago';
|
||||
}
|
||||
|
||||
export const timeConverter = (timestamp) => {
|
||||
|
||||
Reference in New Issue
Block a user