From 20c7615c364fe50fa88a281132fbb0edc2ea716a Mon Sep 17 00:00:00 2001 From: David Sevilla Martin Date: Tue, 23 Jun 2020 09:41:24 -0400 Subject: [PATCH] convert: common/utils/liveHumanTimes This file isn't used anywhere. We should be calling it at some point. It has existed for 5 years. Renamed function because it makes more sense for name to match file name (not that it matters when building) --- .../common/utils/{liveHumanTimes.js => liveHumanTimes.ts} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename framework/core/js/src/common/utils/{liveHumanTimes.js => liveHumanTimes.ts} (53%) diff --git a/framework/core/js/src/common/utils/liveHumanTimes.js b/framework/core/js/src/common/utils/liveHumanTimes.ts similarity index 53% rename from framework/core/js/src/common/utils/liveHumanTimes.js rename to framework/core/js/src/common/utils/liveHumanTimes.ts index 2eac7ef9d..cea16fde5 100644 --- a/framework/core/js/src/common/utils/liveHumanTimes.js +++ b/framework/core/js/src/common/utils/liveHumanTimes.ts @@ -1,18 +1,18 @@ -import humanTimeUtil from './humanTime'; +import humanTime from './humanTime'; function updateHumanTimes() { $('[data-humantime]').each(function () { const $this = $(this); - const ago = humanTimeUtil($this.attr('datetime')); + const ago = humanTime($this.attr('datetime')); $this.html(ago); }); } /** - * The `humanTime` initializer sets up a loop every 1 second to update + * The `liveHumanTimes` initializer sets up a loop every 1 second to update * timestamps rendered with the `humanTime` helper. */ -export default function humanTime() { +export default function liveHumanTimes() { setInterval(updateHumanTimes, 10000); }