• Returns whether the given date is same month with the comparison date

    Parameters

    • Optionaldate: Date

      the date to check

    • Optionalcomparison: Date

      the date to compare

    • deepCompare: boolean = true

      whether compare deeply with year

    Returns boolean

    whether the given date is same month with the comparison date

    isSameMonth(new Date(2023, 8, 1), new Date(2023, 8, 30));    // true