add JsDoc for `formatFromNow`
This commit is contained in:
parent
f446f0da7d
commit
5da586bc2c
|
@ -44,6 +44,10 @@ const timeFrames = [
|
|||
[1, secondUnits],
|
||||
];
|
||||
|
||||
/**
|
||||
* @param {number} timestamp
|
||||
* @returns {string}
|
||||
*/
|
||||
function formatFromNow(timestamp) {
|
||||
const now = Date.now() / 1000;
|
||||
const diff = Math.abs(timestamp - now);
|
||||
|
|
Loading…
Reference in New Issue