From 0e1dc3e7c69995c691e1dd82e3c2bc68748661ca Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Sep 2017 21:21:47 +0200 Subject: Convert tests to typescript --- server/tests/utils/miscs.js | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 server/tests/utils/miscs.js (limited to 'server/tests/utils/miscs.js') diff --git a/server/tests/utils/miscs.js b/server/tests/utils/miscs.js deleted file mode 100644 index c4b661496..000000000 --- a/server/tests/utils/miscs.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict' - -const miscsUtils = { - dateIsValid -} - -// ---------------------- Export functions -------------------- - -function dateIsValid (dateString, interval) { - const dateToCheck = new Date(dateString) - const now = new Date() - - // Check if the interval is more than 2 minutes - if (!interval) interval = 120000 - - if (now - dateToCheck > interval) return false - - return true -} - -// --------------------------------------------------------------------------- - -module.exports = miscsUtils -- cgit v1.2.3