about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-04-15 23:02:37 -0400
committerMike Frysinger <vapier@gentoo.org>2016-04-23 03:02:00 -0400
commitd088aa71f15973c36b4df19990127895e28d73ad (patch)
tree40c9879d633c6540d2fc00ed8dfe8ab340b2da2a /locale
parent0a410e76f551c6e6cf6d128f618208049d6a952c (diff)
downloadglibc-d088aa71f15973c36b4df19990127895e28d73ad.tar.gz
glibc-d088aa71f15973c36b4df19990127895e28d73ad.tar.xz
glibc-d088aa71f15973c36b4df19990127895e28d73ad.zip
localedef: change week_1stweek default to 7
The ISO 14652/30112 specs say the defaults for the week keyword are:
	7, 19971130, 7

The localedef has been using those defaults for the first two, but
0 for the last one.
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/ld-time.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index ca31c9c81b..87531bc543 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -487,12 +487,16 @@ No definition for %s category found"), "LC_TIME"));
 	}
     }
 
+  /* Set up defaults based on ISO 30112 WD10 [2014].  */
   if (time->week_ndays == 0)
     time->week_ndays = 7;
 
   if (time->week_1stday == 0)
     time->week_1stday = 19971130;
 
+  if (time->week_1stweek == 0)
+    time->week_1stweek = 7;
+
   if (time->week_1stweek > time->week_ndays)
     WITH_CUR_LOCALE (error (0, 0, _("\
 %s: third operand for value of field `%s' must not be larger than %d"),