]> Savannah Git Hosting - gnulib.git/commitdiff
nl_langinfo: Fix fallback list of month names (regression 2014-07-07).
authorBruno Haible <bruno@clisp.org>
Tue, 6 Feb 2024 20:59:01 +0000 (21:59 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Feb 2024 23:27:12 +0000 (00:27 +0100)
* 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
lib/nl_langinfo.c

index 214be56649e7bd65cf78806d6f1bbabd3515af1c..61025d43ec3adcbb45cebdeb1496be227622ed32 100644 (file)
--- 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
index f872c6d5e22dbf7ddcda9a05c10ddf9f88e8a97e..34350ff2441bf1f16ed01eb23a259eac4c6a944f 100644 (file)
@@ -1,6 +1,6 @@
 /* nl_langinfo() replacement: query locale dependent information.
 
-   Copyright (C) 2007-2023 Free Software Foundation, Inc.
+   Copyright (C) 2007-2024 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
@@ -451,7 +451,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:
@@ -515,7 +515,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))