MCPcopy Index your code
hub / github.com/react-dates/react-dates / isSameMonth

Function isSameMonth

src/utils/isSameMonth.js:3–9  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

1import moment from 'moment';
2
3export default function isSameMonth(a, b) {
4 if (!moment.isMoment(a) || !moment.isMoment(b)) return false;
5 // Compare least significant, most likely to change units first
6 // Moment's isSame clones moment inputs and is a tad slow
7 return a.month() === b.month()
8 && a.year() === b.year();
9}

Callers 6

DayPicker_spec.jsxFile · 0.85
componentDidUpdateMethod · 0.85
isPrevMonthFunction · 0.85
isNextMonthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…