Key the date scrubber caches on DateTimeFormat

Merged
SI
3mo ago
+47-7

The window bound cache was keyed on the culture name, and the resolver cache on the culture itself, whose equality only compares the name and the compare and text info. Two cultures can share a name and still render dates differently: a CurrentCulture carrying Windows user overrides against CultureInfo.GetCultureInfo of the same name, or a clone whose DateTimeFormat was replaced and handed to ScrubInlineDateTimes.

Whichever was measured first then supplied the min and max window lengths for the other, so rendered dates fell outside the probed lengths and silently stopped being scrubbed.

Both caches now key on the DateTimeFormat instance, which is what the bounds are actually derived from.