@sebgroup/frontend-tools
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -10,8 +10,6 @@ import { isValidDate } from '../isValidDate/isValidDate.js'; | ||
function isDateAfter(a, b) { | ||
if (!isValidDate(a) || !isValidDate(b)) { | ||
return a > b; | ||
} | ||
else { | ||
if (isValidDate(a) && isValidDate(b)) { | ||
return a.setHours(0, 0, 0).valueOf() > b.setHours(0, 0, 0).valueOf(); | ||
} | ||
return a > b; | ||
} | ||
@@ -18,0 +16,0 @@ |
@@ -10,10 +10,6 @@ import { isValidDate } from '../isValidDate/isValidDate.js'; | ||
function isDateBefore(a, b) { | ||
if (!isValidDate(a) || !isValidDate(b)) { | ||
return a < b; | ||
if (isValidDate(a) && isValidDate(b)) { | ||
return a.setHours(0, 0, 0).valueOf() < b.setHours(0, 0, 0).valueOf(); | ||
} | ||
else { | ||
return (a.getFullYear() < b.getFullYear() || | ||
a.getMonth() < b.getMonth() || | ||
a.getDate() < b.getDate()); | ||
} | ||
return a < b; | ||
} | ||
@@ -20,0 +16,0 @@ |
@@ -14,8 +14,6 @@ 'use strict'; | ||
function isDateAfter(a, b) { | ||
if (!isValidDate.isValidDate(a) || !isValidDate.isValidDate(b)) { | ||
return a > b; | ||
} | ||
else { | ||
if (isValidDate.isValidDate(a) && isValidDate.isValidDate(b)) { | ||
return a.setHours(0, 0, 0).valueOf() > b.setHours(0, 0, 0).valueOf(); | ||
} | ||
return a > b; | ||
} | ||
@@ -22,0 +20,0 @@ |
@@ -14,10 +14,6 @@ 'use strict'; | ||
function isDateBefore(a, b) { | ||
if (!isValidDate.isValidDate(a) || !isValidDate.isValidDate(b)) { | ||
return a < b; | ||
if (isValidDate.isValidDate(a) && isValidDate.isValidDate(b)) { | ||
return a.setHours(0, 0, 0).valueOf() < b.setHours(0, 0, 0).valueOf(); | ||
} | ||
else { | ||
return (a.getFullYear() < b.getFullYear() || | ||
a.getMonth() < b.getMonth() || | ||
a.getDate() < b.getDate()); | ||
} | ||
return a < b; | ||
} | ||
@@ -24,0 +20,0 @@ |
{ | ||
"name": "@sebgroup/frontend-tools", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "A set of frontend tools", | ||
@@ -5,0 +5,0 @@ "author": "sebgroup", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
309366
3576