(a, b)
| 1 | import moment from 'moment'; |
| 2 | |
| 3 | export default function isSameDay(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.date() === b.date() |
| 8 | && a.month() === b.month() |
| 9 | && a.year() === b.year(); |
| 10 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…