talk: Improvements in voicing "years"

* Enhance LANG_VOICED_DATE_FORMAT to distinguish between "numeric year"
   and "grouped year"  (2020 -> "two thousand twenty" vs "twenty twenty",
   respectively)
 * Metadata year voicing will now use "numeric year" if specified in
   LANG_VOICED_DATE_FORMAT instead of always using grouped year.
 * Datetime year voicing respects the format instead of always using
   "numeric year"

Change-Id: Icc25da7c36107d3e4e8c70291f87a915e2bcabd3
This commit is contained in:
Solomon Peachy 2026-02-24 08:00:29 -05:00
parent c86fd2318d
commit 17edcbd42a
4 changed files with 20 additions and 10 deletions

View file

@ -1566,9 +1566,12 @@ void talk_date(const struct tm *tm, bool enqueue)
for (ptr = format ; *ptr ; ptr++) {
switch(*ptr) {
case 'Y':
case 'y':
talk_number(1900 + tm->tm_year, true);
break;
case 'Y':
talk_year(1900 + tm->tm_year, true);
break;
case 'A':
talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true);
break;