Message ID | 201901060634.AA04158@tamuki.linet.gr.jp |
---|---|
State | Superseded |
Headers |
Received: (qmail 103353 invoked by alias); 6 Jan 2019 06:36:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 103253 invoked by uid 89); 6 Jan 2019 06:36:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.0 required=5.0 tests=BAYES_20, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=May, pad, reign, trouble X-HELO: mail.linet.jp Message-Id: <201901060634.AA04158@tamuki.linet.gr.jp> From: TAMUKI Shoichi <tamuki@linet.gr.jp> Date: Sun, 06 Jan 2019 15:34:01 +0900 To: libc-alpha@sourceware.org Subject: [PATCH v5 2/5] strftime: Set the default width of "%Ey" to 2 [BZ #23758] In-Reply-To: <201901060628.AA04156@tamuki.linet.gr.jp> References: <201901060628.AA04156@tamuki.linet.gr.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii |
Commit Message
TAMUKI Shoichi
Jan. 6, 2019, 6:34 a.m. UTC
The Japanese era name is scheduled to be changed on May 1, 2019. Prior to this, change the alternative representation for year in strftime to pad the number with zero to keep it constant width, so that prevent the trouble we saw in the past from becoming obvious again from the year after the era name changes onward. Since only one Japanese era name is used by each emperor's reign as lately, it is rare that the year ends in one digit or lasts more than three digits. In addition, the default width of month, day, hour, minute, and second is 2, so adjust the default width of year the same as them, and then the whole display balance is improved. Therefore, it would be reasonable to set the default width padding with zero of "%Ey" to 2. ChangeLog: [BZ #23758] * time/strftime_l.c (__strftime_internal): Set the default width padding with zero of "%Ey" to 2. --- time/strftime_l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
This patch is actually just a one-liner and it fixes the problem. I would prefer if the patch 5/5 was split and the documentation relating to the width of %Ey was merged with this patch and pushed together but we can also push it now and work on the documentation later. Siddhesh (CC:), are you OK to push this patch now and work on the documentation later? Other people are welcome to review the commit comment and provide feedback related with the language correctness. Regards, Rafal
On 09/01/19 3:37 PM, Rafal Luzynski wrote: > This patch is actually just a one-liner and it fixes the problem. > I would prefer if the patch 5/5 was split and the documentation > relating to the width of %Ey was merged with this patch and pushed > together but we can also push it now and work on the documentation > later. > > Siddhesh (CC:), are you OK to push this patch now and work on > the documentation later? Patch is OK for inclusion in 2.29, but please push it with the documentation; we don't want a situation where a flag is in but not the documentation. Siddhesh
9.01.2019 11:25 Siddhesh Poyarekar <siddhesh@gotplt.org> wrote: > [...] > Patch is OK for inclusion in 2.29, but please push it with the > documentation; we don't want a situation where a flag is in but not the > documentation. That means: please don't push this patch nor anything else (except the patch 1/5, as I mentioned in the previous email). We need to work on the documentation first and push only when everything is ready. Regards, Rafal
Hello Rafal, From: Rafal Luzynski <digitalfreak@lingonborough.com> Subject: Re: [PATCH v5 2/5] strftime: Set the default width of "%Ey" to 2 [BZ #23758] Date: Wed, 9 Jan 2019 11:07:32 +0100 (CET) > This patch is actually just a one-liner and it fixes the problem. > I would prefer if the patch 5/5 was split and the documentation > relating to the width of %Ey was merged with this patch and pushed > together but we can also push it now and work on the documentation > later. As Siddhesh mentioned, I will revise the patch to include the documentation. Regards, TAMUKI Shoichi
diff --git a/time/strftime_l.c b/time/strftime_l.c index 7ba4179de3e..cbe08e7afb4 100644 --- a/time/strftime_l.c +++ b/time/strftime_l.c @@ -1294,7 +1294,7 @@ __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, if (era) { int delta = tp->tm_year - era->start_date[0]; - DO_NUMBER (1, (era->offset + DO_NUMBER (2, (era->offset + delta * era->absolute_direction)); } #else