MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / isBefore

Function isBefore

tests/test_code/js/moment/moment.js:3772–3783  ·  view source on GitHub ↗
(input, units)

Source from the content-addressed store, hash-verified

3770 }
3771
3772 function isBefore(input, units) {
3773 var localInput = isMoment(input) ? input : createLocal(input);
3774 if (!(this.isValid() && localInput.isValid())) {
3775 return false;
3776 }
3777 units = normalizeUnits(units) || 'millisecond';
3778 if (units === 'millisecond') {
3779 return this.valueOf() < localInput.valueOf();
3780 } else {
3781 return this.clone().endOf(units).valueOf() < localInput.valueOf();
3782 }
3783 }
3784
3785 function isBetween(from, to, units, inclusivity) {
3786 var localFrom = isMoment(from) ? from : createLocal(from),

Callers

nothing calls this directly

Calls 3

isMomentFunction · 0.85
createLocalFunction · 0.85
normalizeUnitsFunction · 0.85

Tested by

no test coverage detected