(a: DateValue, b: DateValue)
| 26 | * date. |
| 27 | */ |
| 28 | export function isSameMonth(a: DateValue, b: DateValue): boolean { |
| 29 | b = toCalendar(b, a.calendar); |
| 30 | // In the Japanese calendar, months can span multiple eras/years, so only compare the first of the month. |
| 31 | a = startOfMonth(a); |
| 32 | b = startOfMonth(b); |
| 33 | return a.era === b.era && a.year === b.year && a.month === b.month; |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Returns whether the given dates occur in the same year, using the calendar system of the first |
no test coverage detected