/home/techb158/ileadtechnology.com/public/admin/bower_components/moment/src/lib/moment
NameSizeModeActions
add-subtract.js17790644editdlrm
calendar.js10600644editdlrm
clone.js990644editdlrm
compare.js21350644editdlrm
constructor.js20750644editdlrm
creation-data.js1910644editdlrm
diff.js19740644editdlrm
format.js21510644editdlrm
from.js5860644editdlrm
get-set.js17920644editdlrm
index.php530644editdlrm
locale.js9480644editdlrm
min-max.js18520644editdlrm
moment.js6100644editdlrm
now.js840644editdlrm
prototype.js54700644editdlrm
start-end-of.js14940644editdlrm
to-type.js7780644editdlrm
to.js5800644editdlrm
valid.js3670644editdlrm
Edit: /home/techb158/ileadtechnology.com/public/admin/bower_components/moment/src/lib/moment/min-max.js (1852B)
import { deprecate } from '../utils/deprecate'; import isArray from '../utils/is-array'; import { createLocal } from '../create/local'; import { createInvalid } from '../create/valid'; export var prototypeMin = deprecate( 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other < this ? this : other; } else { return createInvalid(); } } ); export var prototypeMax = deprecate( 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other > this ? this : other; } else { return createInvalid(); } } ); // Pick a moment m from moments so that m[fn](other) is true for all // other. This relies on the function fn to be transitive. // // moments should either be an array of moment objects or an array, whose // first element is an array of moment objects. function pickBy(fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return createLocal(); } res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; } // TODO: Use [].sort instead? export function min () { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); } export function max () { var args = [].slice.call(arguments, 0); return pickBy('isAfter', args); }