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

Function isBetween

tests/test_code/js/moment/moment.js:3785–3800  ·  view source on GitHub ↗
(from, to, units, inclusivity)

Source from the content-addressed store, hash-verified

3783 }
3784
3785 function isBetween(from, to, units, inclusivity) {
3786 var localFrom = isMoment(from) ? from : createLocal(from),
3787 localTo = isMoment(to) ? to : createLocal(to);
3788 if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
3789 return false;
3790 }
3791 inclusivity = inclusivity || '()';
3792 return (
3793 (inclusivity[0] === '('
3794 ? this.isAfter(localFrom, units)
3795 : !this.isBefore(localFrom, units)) &&
3796 (inclusivity[1] === ')'
3797 ? this.isBefore(localTo, units)
3798 : !this.isAfter(localTo, units))
3799 );
3800 }
3801
3802 function isSame(input, units) {
3803 var localInput = isMoment(input) ? input : createLocal(input),

Callers

nothing calls this directly

Calls 2

isMomentFunction · 0.85
createLocalFunction · 0.85

Tested by

no test coverage detected