Skip to content

Commit

Permalink
Editorial: Refactor handling of numeric-like styles, support differi…
Browse files Browse the repository at this point in the history
…ng hours/minutes vs minutes/seconds separators (#188)

* Editorial: Comprehensively refactors `PartitionDurationFormatPattern`:

* Separates out handling for `"numeric"` and `"2-digit"` styles,
  referred to as "digital styles" in the rest of this commit message, in
  `FormatNumericUnits`, `FormatNumericHours`, `FormatNumericMinutes`,
  `FormatNumericSeconds`, and `NextUnitFractional` AOs

* New AO `ListFormatParts` for portion of
  `PartitionDurationFormatPattern` concerned with ListFormatting the
  NumberFormatted parts

* Bug fix: Incorporate better support for certain locales:

- locales like `"af"` that when using digital styles always use 2-digit
  hours, i.e. "09:00" rather than "9:00".  Added [[HoursDigit]] slot.

- locales like `"fr-CA"` that use a separator between minutes and
  seconds that differs from the separator between hours and minutes, as
  in `"fr-CA"`'s use of 'h' and "min" as separators: 8 h 59 min 59 for 8
  hours, 59 minutes, 59 seconds. Added [[HoursMinutesSeparator]] and
  [[MinutesSecondsSeparator]] slots.
  • Loading branch information
ben-allen committed May 20, 2024
1 parent 70e7be1 commit 835300f
Show file tree
Hide file tree
Showing 2 changed files with 346 additions and 111 deletions.
Loading

0 comments on commit 835300f

Please sign in to comment.