Check if a moment is the same as another moment. The first argument will be parsed as a moment, if not already so.

    When including a second parameter, it will match all units equal or larger. Passing in month will check month and year. Passing in day will check day, month, and .

    1. moment('2010-01-01').isSame('2010-02-01', 'day'); // false, different month

    If the two moments have different timezones, the timezone of the first moment will be used for the comparison.

    1. moment.tz("2018-11-09T10:00:00", "Australia/Sydney").isSame(moment.tz("2018-11-08T12:00:00", "UTC"), "day"); // false