Fix six failing tests

- SheetMonth takes the short months from a fixed list instead of the host's
  ICU data, which abbreviates March as "Mär." in newer CLDR versions
- FirstSentence treats only one- or two-digit numbers as ordinals, so a year
  such as "2025." ends the sentence
- Route smoke tests allow the scoped-CSS attribute after href and decode
  entities before matching umlauts and dashes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-10-10 21:10:19 +02:00
1 parent 55cd201429
commit be1ea4452f
3 files changed
+31 -12

No files matched your search

@@ -34,6 +34,15 @@ public static class EventDateFormat
/// </summary>
private const string DayMonth = "d. MMMM";
/// <summary>
/// The short months for the calendar sheet, January first, without periods.
/// </summary>
/// <remarks>
/// Fixed here so they do not depend on the host's ICU version; see <see cref="SheetMonth"/>.
/// </remarks>
private static readonly string[] SheetMonths =
["Jan", "Feb", "März", "Apr", "Mai", "Juni", "Juli", "Aug", "Sept", "Okt", "Nov", "Dez"];
/// <summary>
/// Formats the date range of an event.
/// </summary>
@@ -76,10 +85,16 @@ public static class EventDateFormat
/// <remarks>
/// Returned in normal case; the sheet's CSS sets it in capitals. The period of the
/// abbreviation (<c>Okt.</c>) is dropped because on a sheet it reads as a stray dot.
/// <para>
/// Taken from <see cref="SheetMonths"/>, not from the culture's <c>MMM</c>
/// format: that comes from the ICU data of the host, and newer CLDR versions
/// abbreviate March as <c>Mär.</c> instead of <c>März</c>, so the sheet
/// would change with the base image.
/// </para>
/// </remarks>
/// <seealso cref="CalendarSheet"/>
public static string SheetMonth(DateTime value)
=> value.ToString("MMM", Cultures.German).TrimEnd('.');
=> SheetMonths[value.Month - 1];
/// <summary>
/// The day of the month for the large number on a calendar sheet.