v1.2.1-beta/functions refactor

This commit is contained in:
Ayushya Amitabh
2020-05-26 14:04:04 -04:00
parent 0184c01504
commit ab13a67d08
15 changed files with 561 additions and 492 deletions
+7
View File
@@ -0,0 +1,7 @@
module.exports = (ds1, ds2) => {
const d1 = new Date(ds1);
const d2 = new Date(ds2);
var diff = (d2.getTime() - d1.getTime()) / 1000;
diff /= 60 * 60;
return Math.abs(Math.round(diff));
};