From 24d1acfc670b742075b766c5f71a0aeae3d2cdab Mon Sep 17 00:00:00 2001 From: Bruno Haible <bruno@clisp.org> Date: Tue, 6 Feb 2024 21:59:01 +0100 Subject: [PATCH] nl_langinfo: Fix fallback list of month names (regression 2014-07-07). * lib/nl_langinfo.c (nl_langinfo): In the implementation for native Windows, fix the results for MON_8..MON_12, ALTMON_8..ALTMON_12, ABMON_8..ABMON_12. --- ChangeLog | 7 +++++++ lib/nl_langinfo.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76f9a47244..887b893d32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-02-06 Bruno Haible <bruno@clisp.org> + + nl_langinfo: Fix fallback list of month names (regression 2014-07-07). + * lib/nl_langinfo.c (nl_langinfo): In the implementation for native + Windows, fix the results for MON_8..MON_12, ALTMON_8..ALTMON_12, + ABMON_8..ABMON_12. + 2024-02-03 Paul Eggert <eggert@cs.ucla.edu> ctime: fix false positive diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c index 2a6be82732..64ff93b0cb 100644 --- a/lib/nl_langinfo.c +++ b/lib/nl_langinfo.c @@ -462,7 +462,7 @@ nl_langinfo (nl_item item) { static char const months[][sizeof "September"] = { "January", "February", "March", "April", "May", "June", "July", - "September", "October", "November", "December" + "August", "September", "October", "November", "December" }; case MON_1: case MON_2: @@ -526,7 +526,7 @@ nl_langinfo (nl_item item) static char result[12][30]; static char const abmonths[][sizeof "Jan"] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", - "Sep", "Oct", "Nov", "Dec" + "Aug", "Sep", "Oct", "Nov", "Dec" }; tmm.tm_mon = item - ABMON_1; if (!strftime (buf, sizeof result[0], "%b", &tmm)) -- 2.39.5