From 5da586bc2cd4b95dc29a293d4770c147149df8d9 Mon Sep 17 00:00:00 2001 From: Thomas Rupprecht Date: Sat, 10 Dec 2022 15:23:37 +0100 Subject: [PATCH] add JsDoc for `formatFromNow` --- resources/assets/js/countdown.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/assets/js/countdown.js b/resources/assets/js/countdown.js index a31a2d36..2909e566 100644 --- a/resources/assets/js/countdown.js +++ b/resources/assets/js/countdown.js @@ -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);