fixed date bug that displayed 1 hours instead of 1 hour
This commit is contained in:
@@ -27,6 +27,8 @@ export const FormatDate = (date) => {
|
|||||||
else if (diff.as('days') < 1)
|
else if (diff.as('days') < 1)
|
||||||
if (diff.as('hours') < 1)
|
if (diff.as('hours') < 1)
|
||||||
return Math.floor(diff.as('minutes')) + ' minutes ago'
|
return Math.floor(diff.as('minutes')) + ' minutes ago'
|
||||||
|
else if (Math.floor(diff.as('hours')) === 1)
|
||||||
|
return Math.floor(diff.as('hours')) + ' hour ago'
|
||||||
else
|
else
|
||||||
return Math.floor(diff.as('hours')) + ' hours ago'
|
return Math.floor(diff.as('hours')) + ' hours ago'
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user