function assertParsedDateEquals(
    expectYear, expectMonth, expectDate, parser, text, options) {
  const date = new Date(0);

  assertEquals(
      options?.partial ?? text.length, parser.parse(text, date, options));
  assertDateEquals(expectYear, expectMonth, expectDate, date);
}
Parses and asserts that the result has the expected values.
@param {number|undefined} expectYear
@param {number} expectMonth calendar month (1-based)
@param {number|undefined} expectDate
@param {!DateTimeParse} parser
@param {string} text
@param {!AssertParseOptions=} options