ublo-lib 1.18.3 → 1.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -66,6 +66,14 @@ export const isBefore = (date, ref) => {
|
|
|
66
66
|
const _ref = new Date(r);
|
|
67
67
|
return _date < _ref;
|
|
68
68
|
};
|
|
69
|
+
export const isAfter = (date, ref) => {
|
|
70
|
+
if (!date || !ref) return false;
|
|
71
|
+
const d = Array.isArray(date) ? date.join("-") : date;
|
|
72
|
+
const r = Array.isArray(ref) ? ref.join("-") : ref;
|
|
73
|
+
const _date = new Date(d);
|
|
74
|
+
const _ref = new Date(r);
|
|
75
|
+
return _date > _ref;
|
|
76
|
+
};
|
|
69
77
|
export function addDays(_date, days) {
|
|
70
78
|
const date = new Date(_date);
|
|
71
79
|
date.setDate(date.getDate() + days);
|