add JsDoc for `formatFromNow`

This commit is contained in:
Thomas Rupprecht 2022-12-10 15:23:37 +01:00 committed by Igor Scheller
parent f446f0da7d
commit 5da586bc2c
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@ const timeFrames = [
[1, secondUnits], [1, secondUnits],
]; ];
/**
* @param {number} timestamp
* @returns {string}
*/
function formatFromNow(timestamp) { function formatFromNow(timestamp) {
const now = Date.now() / 1000; const now = Date.now() / 1000;
const diff = Math.abs(timestamp - now); const diff = Math.abs(timestamp - now);