From owner-freebsd-current@freebsd.org Fri Jun 17 18:42:26 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A4DAA78BF8 for ; Fri, 17 Jun 2016 18:42:26 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 7218F27A9; Fri, 17 Jun 2016 18:42:26 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 90A5F56493; Fri, 17 Jun 2016 13:42:25 -0500 (CDT) Subject: Re: Date formatting with en_US locale To: Baptiste Daroussin References: <499d8ddd-06c8-5184-68cb-4be19764b318@FreeBSD.org> <20160526144944.GD977@ivaldir.etoilebsd.net> <20160526151508.GE977@ivaldir.etoilebsd.net> Cc: freebsd-current@freebsd.org From: Eric van Gyzen Message-ID: <6d8f5e72-b3ab-9aa6-4fb6-1986b7b4f19b@FreeBSD.org> Date: Fri, 17 Jun 2016 13:42:22 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160526151508.GE977@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 18:42:26 -0000 On 05/26/16 10:15 AM, Baptiste Daroussin wrote: > On Thu, May 26, 2016 at 11:55:08AM -0300, Otacílio wrote: >> Em 26/05/2016 11:49, Baptiste Daroussin escreveu: >>> On Thu, May 26, 2016 at 09:44:25AM -0500, Eric van Gyzen wrote: >>>> Baptiste and -current, >>>> >>>> I noticed two annoyances with date formatting on head, and I wonder how >>>> we can fix them. >>>> >>>> I have these settings: >>>> >>>> LC_ALL=en_US.ISO8859-1 >>>> LANG=en_US.ISO8859-1 >>>> >>>> First, Thunderbird displays the date as, for example: >>>> >>>> 03/ 6/16 ... >>>> >>>> The leading space on the day (6) looks weird. I might even say it's >>>> simply wrong. Zero-padding would better. (/No/ padding would be best, >>>> but I don't think strftime supports that.) >>>> >>>> Second, date(1) no longer shows the day-of-week: >>>> >>>> $ date >>>> March 26, 2016 at 09:21:55 AM CDT >>>> >>>> For many years, I have been typing "date" to see the day-of-week (and >>>> other things). I like the new human-friendly format, but I miss the >>>> day-of-week. >>>> >>>> Of course, I can fix these locally, but I wonder how we can fix them for >>>> everyone. I see that the formats come from CLDR. I also see that ume@ >>>> restored the day-of-week for ja_JP in r292512. Is this the best >>>> approach, or should we try to get them changed upstream (CLDR)? >>>> >>>> Thanks for your input, >>> I can hack cldr2def.pl to readd the week of day as it was before for 11.0 still >>> the best approach is to push the change upstream. >>> >>> I will have a look at the cldr2def.pl hack this week end. >>> >>> Best regards, >>> Bapt >> LANG=pt_BR.UTF-8 >> >> MM_CHARSET=UTF-8 >> > By adding the hack I mean to do it for all locales not cherry picking Thank you for fixing this! Above, I mentioned two issues. The other one is, the date format for en_US pads the month with a zero, but the day with a space. So, June 7 is: 06/ 7/16 That looks weird. It should pad both with zeros. I'd be happy to fix it, but I don't see how: There isn't an "xformat" callback in the cldr2def.pl script, and it's not clear how to add one. If you can explain, I'll do it. If you can fix it, I'll be grateful. ;) Eric