@@ 2635-2643 (lines=9) @@ | ||
2632 | } |
|
2633 | }, |
|
2634 | ||
2635 | isBefore: function (input, units) { |
|
2636 | units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); |
|
2637 | if (units === 'millisecond') { |
|
2638 | input = moment.isMoment(input) ? input : moment(input); |
|
2639 | return +this < +input; |
|
2640 | } else { |
|
2641 | return +this.clone().startOf(units) < +moment(input).startOf(units); |
|
2642 | } |
|
2643 | }, |
|
2644 | ||
2645 | isSame: function (input, units) { |
|
2646 | units = normalizeUnits(units || 'millisecond'); |
|
@@ 2625-2633 (lines=9) @@ | ||
2622 | return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); |
|
2623 | }, |
|
2624 | ||
2625 | isAfter: function (input, units) { |
|
2626 | units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); |
|
2627 | if (units === 'millisecond') { |
|
2628 | input = moment.isMoment(input) ? input : moment(input); |
|
2629 | return +this > +input; |
|
2630 | } else { |
|
2631 | return +this.clone().startOf(units) > +moment(input).startOf(units); |
|
2632 | } |
|
2633 | }, |
|
2634 | ||
2635 | isBefore: function (input, units) { |
|
2636 | units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); |