You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
1 year ago
|
!(function (e, n) {
|
||
|
if ('object' == typeof exports && 'undefined' != typeof module) {
|
||
|
module.exports = n();
|
||
|
} else {
|
||
|
if ('function' == typeof define && define.amd) {
|
||
|
define(n);
|
||
|
} else {
|
||
|
(e = 'undefined' != typeof globalThis ? globalThis : e || self).dayjs_plugin_minMax = n();
|
||
|
}
|
||
|
}
|
||
|
})(this, function () {
|
||
|
'use strict';
|
||
|
|
||
|
return function (e, n, t) {
|
||
|
var i = function (e, n) {
|
||
|
if (!n || !n.length || !n[0] || (1 === n.length && !n[0].length)) {
|
||
|
return null;
|
||
|
}
|
||
|
var t;
|
||
|
if (1 === n.length && n[0].length > 0) {
|
||
|
n = n[0];
|
||
|
}
|
||
|
t = n[0];
|
||
|
for (var i = 1; i < n.length; i += 1) {
|
||
|
(n[i].isValid() && !n[i][e](t)) || (t = n[i]);
|
||
|
}
|
||
|
return t;
|
||
|
};
|
||
|
t.max = function () {
|
||
|
var e = [].slice.call(arguments, 0);
|
||
|
return i('isAfter', e);
|
||
|
};
|
||
|
t.min = function () {
|
||
|
var e = [].slice.call(arguments, 0);
|
||
|
return i('isBefore', e);
|
||
|
};
|
||
|
};
|
||
|
});
|