(from, to, units, inclusivity)
| 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), |
nothing calls this directly
no test coverage detected