From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Time string format Date: Sat, 20 Nov 2010 12:09:26 +0200 Message-ID: <83aal4b92h.fsf@gnu.org> References: <83k4k9b1f9.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1290247901 31668 80.91.229.12 (20 Nov 2010 10:11:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 20 Nov 2010 10:11:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Deniz Dogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 20 11:11:37 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PJkPw-00009z-CY for ged-emacs-devel@m.gmane.org; Sat, 20 Nov 2010 11:11:36 +0100 Original-Received: from localhost ([127.0.0.1]:39505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJkPv-0006e4-Kd for ged-emacs-devel@m.gmane.org; Sat, 20 Nov 2010 05:11:35 -0500 Original-Received: from [140.186.70.92] (port=43165 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJkPo-0006dy-9f for emacs-devel@gnu.org; Sat, 20 Nov 2010 05:11:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJkPn-0006If-7A for emacs-devel@gnu.org; Sat, 20 Nov 2010 05:11:28 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:36060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJkPn-0006HH-0P for emacs-devel@gnu.org; Sat, 20 Nov 2010 05:11:27 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LC600400HKANM00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Sat, 20 Nov 2010 12:11:25 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.52.47]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LC60042WHMZCZB0@a-mtaout21.012.net.il>; Sat, 20 Nov 2010 12:11:24 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132897 Archived-At: > From: Deniz Dogan > Date: Sat, 20 Nov 2010 03:49:24 +0100 > Cc: emacs-devel@gnu.org >=20 > 2010/11/19 Eli Zaretskii : > > time.el:display-time-string-forms believes that the right format = for > > displaying the date in the mode-line tooltip is "%a %b %e, %Y". = =A0This > > is not necessarily TRT in languages other than English, because > > putting the month name before the day of the month does not > > necessarily read well in other languages. > > > > Would it be a good idea to have an element of language-info-alist= that > > provides a proper format for this? > > > > >=20 > In the docstring for `format-time-string': Granted, I've read that ;-) > %c is the locale's date and time format. > %x is the locale's "preferred" date format. > %X is the locale's "preferred" time format. > %EX is a locale's alternative version of %X; > %OX is like %X, but uses the locale's number symbols. >=20 > One of these or a combination of multiple formats seems ideal to me= . I think you are missing the point. The issue is not what each of the format specifiers produce, the issue is their order in a _well-formatted_and_short_date_ string. When viewed from this POV, I think you will agree with me that . %x is inappropriate, because in most (if not all) locales it returns a numerical date, like 11/22/33, while time.el wants to produce human-readable names of the month and the week-day . %X, %EX, and %OX are irrelevant, because I was talking about the date, not the time . %c is inappropriate, because it shows the time together with the date . any combination of the above will be inappropriate for the same reasons the individual specifiers are It is therefore a small wonder that time.el does not use any of these= , but instead attempts to define its own format. The problem is that the result is not correct for some locales/languages. I was asking about a good way of having that fixed.