[PATCH] localedata: hy_AM: Use 24-hour time format

Avinal Kumar avinal.xlvii@gmail.com
Mon Nov 9 06:33:24 GMT 2026


On Thu, Oct 29, 2026 at 2:51 AM <norayr@arnet.am> wrote:
>
> From: Norayr Chilingarian <norayr@arnet.am>
>

Thank you for the patch.

> The Armenian locale currently uses the 12-hour %r format without
> AM/PM indicators. This results in identical localized time
> representations for 11:15 and 23:15.
>

The bug is real: with am_pm empty, %r prints the same time for 11:15
and 23:15, and switching to %H:%M:%S fixes that.

> Switch d_t_fmt, date_fmt, and t_fmt to 24-hour notation using %H,
> consistent with Unicode CLDR's Armenian locale data and FreeBSD's
> CLDR-derived locale implementation.
>
> Unicode CLDR Armenian locale:
> https://github.com/unicode-org/cldr/blob/main/common/main/hy.xml
>

I checked Armenian CLDR. The time patterns are inherited, and the
default hour cycle is 24-hour (H, Hm, Hms, EHm, EHms). That supports
the change. However, availableFormats also has 12-hour Ehm/Ehms
skeletons with a, and hy has no local AM/PM strings. So "consistent
with CLDR" should be worded as "CLDR's default hour cycle is 24-hour",
not as absolute. Also checked:
https://st.unicode.org/cldr-apps/v#r_datetime/hy//. I couldn't verify
the FreeBSD claim; please include a reference or remove it.

This changes %c, %X, and %r output for every hy_AM user. The commit
message should say so explicitly.

> Armenian legislation also prescribes 24-hour time notation for
> normative legal acts (Law on Normative Legal Acts, Article 21(6)):
> https://www.parliament.am/hy/legislations/3/6269/

I was unable to verify this as well. The page only has site
navigation. Please reference the exact law text or remove this from
the commit body. The CLDR reference is enough, so if you choose to
include this, it will be an additional reference.

> ---
>  localedata/locales/hy_AM | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/localedata/locales/hy_AM b/localedata/locales/hy_AM
> index fd7ea763f7..b54c7f4e9c 100644
> --- a/localedata/locales/hy_AM
> +++ b/localedata/locales/hy_AM
> @@ -154,10 +154,10 @@ mon         "հունվարի";/
>              "հոկտեմբերի";/
>              "նոյեմբերի";/
>              "դեկտեմբերի"
> -d_t_fmt     "%a %d %b %Y %r"
> -date_fmt    "%a %d %b %Y %r %Z"
> +d_t_fmt     "%a %d %b %Y %H:%M:%S"
> +date_fmt    "%a %d %b %Y %H:%M:%S %Z"
>  d_fmt       "%m//%d//%y"
> -t_fmt       "%r"
> +t_fmt       "%H:%M:%S"
>  am_pm       "";""
>  t_fmt_ampm  ""
>  week 7;19971130;1
> --
> 2.55.0
>

Just a nitpick: glibc style is usually localedata: Use 24-hour time
format in hy_AM.

Thanks
- Avinal


More information about the Libc-alpha mailing list