testNoFlexibleDayPeriodData() {
    // Check that fallback with no dayPeriod for 'b' and 'B' results in
    // AM/PM format.
    // The string pattern will force JavaScript mode only, not ECMAScript.
    // Note that this will fail if a de locale pattern adds 'B' or 'b'
    // as a format symbol.
    const midnight = new Date(2022, 4, 25, 0, 0, 0);
    const noon = new Date(2022, 4, 25, 12, 0, 0);
    const morning = new Date(2022, 4, 25, 9, 7, 17);
    const evening = new Date(2022, 4, 25, 18, 29, 0);

    replacer.replace(goog.i18n, 'DateTimePatterns', DateTimePatterns_de);
    replacer.replace(goog.i18n, 'DateTimeSymbols', DateTimeSymbols_de);
    setDayPeriods(null);

    for (let nativeMode of testECMAScriptOptions) {
      replacer.replace(
          LocaleFeature, 'USE_ECMASCRIPT_I18N_DATETIMEF', nativeMode);
      const fmtFlexible = new DateTimeFormat('HH B');
      const fmtNoonMidnight = new DateTimeFormat('HH b');

      let result;
      result = fmtFlexible.format(midnight);
      assertI18nEquals(result, '00 AM');
      result = fmtFlexible.format(noon);
      assertI18nEquals(result, '12 PM');
      result = fmtFlexible.format(morning);
      assertI18nEquals(result, '09 AM');
      result = fmtFlexible.format(evening);
      assertI18nEquals(result, '18 PM');

      result = fmtNoonMidnight.format(midnight);
      assertI18nEquals(result, '00 AM');
      result = fmtNoonMidnight.format(noon);
      assertI18nEquals(result, '12 PM');
      result = fmtNoonMidnight.format(morning);
      assertI18nEquals(result, '09 AM');
      result = fmtNoonMidnight.format(evening);
      assertI18nEquals(result, '18 PM');
    }
  }
Set up artificial 'night1' extending from 23:00 to 05:00 to test
handling of day periods including midnight.
{goog.i18n.DayPeriods}