From patchwork Sat Apr 16 07:26:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 611317 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qn5Zb1lVkz9t5C for ; Sat, 16 Apr 2016 17:27:02 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=Nxz+hcuP; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=mh1m11U4UlDctv3lDwWeLenJHUbb+2voJnJSnw760Xt0/Rs3HHw46 +V1PnImkuzxR9vXKd20SK6IK7GGkfPyDLME1vkAc3jfr5LecDGPEwkEcpdLta32G 3FsM9EwdTmwCc6qsffPsXnU0y4tRibvQdEfv6kXWkogDDyIm+Kmg1E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=IGbHyarZz8H6dGER/W1D006dthY=; b=Nxz+hcuP2drMAoGdcftkjPuE7ykU 0ozIKQgf6t/vah64771GwmI2NxJxFr2dNoPmzs+qXVi/ate5pZ88vcmFyKML3q8a TupIUKgRzSLvP7rgadXe6dTY5N1ZRg9ER/NuuYkGNLlL70mbsun1doFLWB2uXWsY 8JDn+Vr8zo+WJC0= Received: (qmail 59641 invoked by alias); 16 Apr 2016 07:26:54 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 59626 invoked by uid 89); 16 Apr 2016 07:26:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:921 X-HELO: smtp.gentoo.org From: Mike Frysinger To: libc-alpha@sourceware.org Subject: [PATCH] localedef: change week_1stweek default to 7 Date: Sat, 16 Apr 2016 03:26:48 -0400 Message-Id: <1460791608-25677-1-git-send-email-vapier@gentoo.org> 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. --- locale/programs/ld-time.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c index ca31c9c..87531bc 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"),