mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added Just now
as a timestamp
ref https://linear.app/tryghost/issue/AP-282/render-notes-in-the-frontend
This commit is contained in:
parent
0cf5d11bf2
commit
4aa5e4f091
1 changed files with 5 additions and 1 deletions
|
@ -26,8 +26,12 @@ export const getRelativeTimestamp = (date: Date): string => {
|
||||||
if (interval >= 1) {
|
if (interval >= 1) {
|
||||||
return `${interval}m`;
|
return `${interval}m`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (seconds < 1) {
|
||||||
|
return `Just now`;
|
||||||
|
}
|
||||||
|
|
||||||
return `${seconds} seconds`;
|
return `${seconds}s`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default getRelativeTimestamp;
|
export default getRelativeTimestamp;
|
Loading…
Add table
Reference in a new issue