* Time string format @ 2010-11-19 18:42 Eli Zaretskii 2010-11-19 18:51 ` Lennart Borgman ` (2 more replies) 0 siblings, 3 replies; 31+ messages in thread From: Eli Zaretskii @ 2010-11-19 18:42 UTC (permalink / raw) To: emacs-devel 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". This 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? ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-19 18:42 Time string format Eli Zaretskii @ 2010-11-19 18:51 ` Lennart Borgman 2010-11-19 19:03 ` Eli Zaretskii 2010-11-20 2:49 ` Deniz Dogan 2010-11-20 3:47 ` David De La Harpe Golden 2 siblings, 1 reply; 31+ messages in thread From: Lennart Borgman @ 2010-11-19 18:51 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel On Fri, Nov 19, 2010 at 7:42 PM, Eli Zaretskii <eliz@gnu.org> wrote: > 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". This > 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? Maybe, but why not use ISO format?§ ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-19 18:51 ` Lennart Borgman @ 2010-11-19 19:03 ` Eli Zaretskii 2010-11-19 19:36 ` Lennart Borgman 0 siblings, 1 reply; 31+ messages in thread From: Eli Zaretskii @ 2010-11-19 19:03 UTC (permalink / raw) To: Lennart Borgman; +Cc: emacs-devel > From: Lennart Borgman <lennart.borgman@gmail.com> > Date: Fri, 19 Nov 2010 19:51:40 +0100 > Cc: emacs-devel@gnu.org > > On Fri, Nov 19, 2010 at 7:42 PM, Eli Zaretskii <eliz@gnu.org> wrote: > > 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". This > > 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? > > Maybe, but why not use ISO format?§ I don't understand what exactly do you mean and how it would solve the issue I was talking about. Please explain more. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-19 19:03 ` Eli Zaretskii @ 2010-11-19 19:36 ` Lennart Borgman 2010-11-19 22:15 ` Eli Zaretskii 0 siblings, 1 reply; 31+ messages in thread From: Lennart Borgman @ 2010-11-19 19:36 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel On Fri, Nov 19, 2010 at 8:03 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Lennart Borgman <lennart.borgman@gmail.com> >> Date: Fri, 19 Nov 2010 19:51:40 +0100 >> Cc: emacs-devel@gnu.org >> >> On Fri, Nov 19, 2010 at 7:42 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> > 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". This >> > 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? >> >> Maybe, but why not use ISO format?§ > > I don't understand what exactly do you mean and how it would solve the > issue I was talking about. Please explain more. There is an ISO format for displaying time. See the doc string of format-time-string, at the bottom. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-19 19:36 ` Lennart Borgman @ 2010-11-19 22:15 ` Eli Zaretskii 2010-11-20 1:25 ` Lennart Borgman 0 siblings, 1 reply; 31+ messages in thread From: Eli Zaretskii @ 2010-11-19 22:15 UTC (permalink / raw) To: Lennart Borgman; +Cc: emacs-devel > From: Lennart Borgman <lennart.borgman@gmail.com> > Date: Fri, 19 Nov 2010 20:36:06 +0100 > Cc: emacs-devel@gnu.org > > There is an ISO format for displaying time. See the doc string of > format-time-string, at the bottom. I don't see any relevance of the ISO format to the issue at hand. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-19 22:15 ` Eli Zaretskii @ 2010-11-20 1:25 ` Lennart Borgman 2010-11-20 9:43 ` Eli Zaretskii 0 siblings, 1 reply; 31+ messages in thread From: Lennart Borgman @ 2010-11-20 1:25 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel On Fri, Nov 19, 2010 at 11:15 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Lennart Borgman <lennart.borgman@gmail.com> >> Date: Fri, 19 Nov 2010 20:36:06 +0100 >> Cc: emacs-devel@gnu.org >> >> There is an ISO format for displaying time. See the doc string of >> format-time-string, at the bottom. > > I don't see any relevance of the ISO format to the issue at hand. Why not? Is not the ISO time format relevant for all languages? Or do you think of right-to-left languages? ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 1:25 ` Lennart Borgman @ 2010-11-20 9:43 ` Eli Zaretskii 2010-11-20 12:08 ` Lennart Borgman 0 siblings, 1 reply; 31+ messages in thread From: Eli Zaretskii @ 2010-11-20 9:43 UTC (permalink / raw) To: Lennart Borgman; +Cc: emacs-devel > From: Lennart Borgman <lennart.borgman@gmail.com> > Date: Sat, 20 Nov 2010 02:25:16 +0100 > Cc: emacs-devel@gnu.org > > On Fri, Nov 19, 2010 at 11:15 PM, Eli Zaretskii <eliz@gnu.org> wrote: > >> From: Lennart Borgman <lennart.borgman@gmail.com> > >> Date: Fri, 19 Nov 2010 20:36:06 +0100 > >> Cc: emacs-devel@gnu.org > >> > >> There is an ISO format for displaying time. See the doc string of > >> format-time-string, at the bottom. > > > > I don't see any relevance of the ISO format to the issue at hand. > > Why not? Is not the ISO time format relevant for all languages? No. You cannot force a culture to use ISO. The ISO format, as I understand it, is mainly for machine-readable output, not for humans. > Or do you think of right-to-left languages? That too, but not just. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 9:43 ` Eli Zaretskii @ 2010-11-20 12:08 ` Lennart Borgman 2010-11-20 12:38 ` Eli Zaretskii 0 siblings, 1 reply; 31+ messages in thread From: Lennart Borgman @ 2010-11-20 12:08 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel On Sat, Nov 20, 2010 at 10:43 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Lennart Borgman <lennart.borgman@gmail.com> >> Date: Sat, 20 Nov 2010 02:25:16 +0100 >> Cc: emacs-devel@gnu.org >> >> On Fri, Nov 19, 2010 at 11:15 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> >> From: Lennart Borgman <lennart.borgman@gmail.com> >> >> Date: Fri, 19 Nov 2010 20:36:06 +0100 >> >> Cc: emacs-devel@gnu.org >> >> >> >> There is an ISO format for displaying time. See the doc string of >> >> format-time-string, at the bottom. >> > >> > I don't see any relevance of the ISO format to the issue at hand. >> >> Why not? Is not the ISO time format relevant for all languages? > > No. You cannot force a culture to use ISO. The ISO format, as I > understand it, is mainly for machine-readable output, not for humans. It was invented for paper format from the beginning. The purpose was mainly avoiding misunderstandings. (But US did not adapt it so the misunderstandings continued.) >> Or do you think of right-to-left languages? > > That too, but not just. Don't they have a common standardized time format? ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 12:08 ` Lennart Borgman @ 2010-11-20 12:38 ` Eli Zaretskii 2010-11-20 13:34 ` Lennart Borgman 0 siblings, 1 reply; 31+ messages in thread From: Eli Zaretskii @ 2010-11-20 12:38 UTC (permalink / raw) To: Lennart Borgman; +Cc: emacs-devel > From: Lennart Borgman <lennart.borgman@gmail.com> > Date: Sat, 20 Nov 2010 13:08:19 +0100 > Cc: emacs-devel@gnu.org > > Don't they have a common standardized time format? They do, but that's not relevant for this issue. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 12:38 ` Eli Zaretskii @ 2010-11-20 13:34 ` Lennart Borgman 2010-11-20 13:36 ` Lennart Borgman 2010-11-20 15:30 ` Eli Zaretskii 0 siblings, 2 replies; 31+ messages in thread From: Lennart Borgman @ 2010-11-20 13:34 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel On Sat, Nov 20, 2010 at 1:38 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Lennart Borgman <lennart.borgman@gmail.com> >> Date: Sat, 20 Nov 2010 13:08:19 +0100 >> Cc: emacs-devel@gnu.org >> >> Don't they have a common standardized time format? > > They do, but that's not relevant for this issue. I think you are wrong. I do not know the RL standard but the ISO 8601 format is for computer user interface. The purpose is to avoid confusion. In my opinion we should use the international standard when it is possible. Standard helps free software since it requires less resources. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 13:34 ` Lennart Borgman @ 2010-11-20 13:36 ` Lennart Borgman 2010-11-20 15:39 ` Eli Zaretskii 2010-11-20 15:30 ` Eli Zaretskii 1 sibling, 1 reply; 31+ messages in thread From: Lennart Borgman @ 2010-11-20 13:36 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel On Sat, Nov 20, 2010 at 2:34 PM, Lennart Borgman <lennart.borgman@gmail.com> wrote: > On Sat, Nov 20, 2010 at 1:38 PM, Eli Zaretskii <eliz@gnu.org> wrote: >>> From: Lennart Borgman <lennart.borgman@gmail.com> >>> Date: Sat, 20 Nov 2010 13:08:19 +0100 >>> Cc: emacs-devel@gnu.org >>> >>> Don't they have a common standardized time format? >> >> They do, but that's not relevant for this issue. > > I think you are wrong. I do not know the RL standard but the ISO 8601 > format is for computer user interface. The purpose is to avoid > confusion. Forgot: here are some links for those who want to learn about it: http://www.cl.cam.ac.uk/~mgk25/iso-time.html http://www.iso.org/iso/date_and_time_format > In my opinion we should use the international standard when it is > possible. Standard helps free software since it requires less > resources. > ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 13:36 ` Lennart Borgman @ 2010-11-20 15:39 ` Eli Zaretskii 2010-11-20 16:17 ` Lennart Borgman 0 siblings, 1 reply; 31+ messages in thread From: Eli Zaretskii @ 2010-11-20 15:39 UTC (permalink / raw) To: Lennart Borgman; +Cc: emacs-devel > From: Lennart Borgman <lennart.borgman@gmail.com> > Date: Sat, 20 Nov 2010 14:36:47 +0100 > Cc: emacs-devel@gnu.org > > http://www.cl.cam.ac.uk/~mgk25/iso-time.html > http://www.iso.org/iso/date_and_time_format These explain that the ISO format resolves the ambiguity in numerical specifications of dates. Therefore, it's irrelevant to the issue in this thread, which is how to display non-numerical dates. There's no ambiguity in "20 Nov 2010". Not to mention that the date format discussed here is specific to a locale's language, whereas the ISO format is agnostic to the locale. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 15:39 ` Eli Zaretskii @ 2010-11-20 16:17 ` Lennart Borgman 2010-11-20 16:39 ` Eli Zaretskii 2010-11-20 16:49 ` Óscar Fuentes 0 siblings, 2 replies; 31+ messages in thread From: Lennart Borgman @ 2010-11-20 16:17 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel On Sat, Nov 20, 2010 at 4:39 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Lennart Borgman <lennart.borgman@gmail.com> >> Date: Sat, 20 Nov 2010 14:36:47 +0100 >> Cc: emacs-devel@gnu.org >> >> http://www.cl.cam.ac.uk/~mgk25/iso-time.html >> http://www.iso.org/iso/date_and_time_format > > These explain that the ISO format resolves the ambiguity in numerical > specifications of dates. Therefore, it's irrelevant to the issue in > this thread, which is how to display non-numerical dates. There's no > ambiguity in "20 Nov 2010". Not to mention that the date format > discussed here is specific to a locale's language, whereas the ISO > format is agnostic to the locale. We are discussing the time string format for the mode line. ISO is perfect for local formatting because it is the same for all locales. My impression is that you do not like the format I suggest and therefore say it is irrelevant. You are entitled to your opinion but not to dismissing relevant information as irrelevant. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 16:17 ` Lennart Borgman @ 2010-11-20 16:39 ` Eli Zaretskii 2010-11-20 16:49 ` Óscar Fuentes 1 sibling, 0 replies; 31+ messages in thread From: Eli Zaretskii @ 2010-11-20 16:39 UTC (permalink / raw) To: Lennart Borgman; +Cc: emacs-devel > From: Lennart Borgman <lennart.borgman@gmail.com> > Date: Sat, 20 Nov 2010 17:17:00 +0100 > Cc: emacs-devel@gnu.org > > We are discussing the time string format for the mode line. Not in the mode line, in a tooltip that pops up when the mouse hovers above the time string. > My impression is that you do not like the format I suggest and > therefore say it is irrelevant. It's not I who doesn't like that, it's time.el. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 16:17 ` Lennart Borgman 2010-11-20 16:39 ` Eli Zaretskii @ 2010-11-20 16:49 ` Óscar Fuentes 2010-11-21 13:53 ` Stephen J. Turnbull 1 sibling, 1 reply; 31+ messages in thread From: Óscar Fuentes @ 2010-11-20 16:49 UTC (permalink / raw) To: emacs-devel; +Cc: Lennart Borgman Lennart Borgman <lennart.borgman@gmail.com> writes: > We are discussing the time string format for the mode line. ISO is > perfect for local formatting because it is the same for all locales. How can a fixed format be perfect for *local* formatting? The user wants to see dates on a format that is familiar to him. So ISO is just another format. [snip] ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 16:49 ` Óscar Fuentes @ 2010-11-21 13:53 ` Stephen J. Turnbull 2010-11-21 13:55 ` Lennart Borgman 0 siblings, 1 reply; 31+ messages in thread From: Stephen J. Turnbull @ 2010-11-21 13:53 UTC (permalink / raw) To: Óscar Fuentes; +Cc: Lennart Borgman, emacs-devel Óscar Fuentes writes: > How can a fixed format be perfect for *local* formatting? The user wants > to see dates on a format that is familiar to him. So ISO is just another > format. +1 ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-21 13:53 ` Stephen J. Turnbull @ 2010-11-21 13:55 ` Lennart Borgman 2010-11-21 14:25 ` Stephen J. Turnbull 2010-11-21 15:23 ` Harald Hanche-Olsen 0 siblings, 2 replies; 31+ messages in thread From: Lennart Borgman @ 2010-11-21 13:55 UTC (permalink / raw) To: Stephen J. Turnbull; +Cc: Óscar Fuentes, emacs-devel On Sun, Nov 21, 2010 at 2:53 PM, Stephen J. Turnbull <stephen@xemacs.org> wrote: > Óscar Fuentes writes: > > > How can a fixed format be perfect for *local* formatting? The user wants > > to see dates on a format that is familiar to him. So ISO is just another > > format. > > +1 "2010-11-21" - in what local is that not perfectly valid? Do we really have Emacs users that do not understand this standard ISO format? ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-21 13:55 ` Lennart Borgman @ 2010-11-21 14:25 ` Stephen J. Turnbull 2010-11-21 16:07 ` Lennart Borgman 2010-11-21 15:23 ` Harald Hanche-Olsen 1 sibling, 1 reply; 31+ messages in thread From: Stephen J. Turnbull @ 2010-11-21 14:25 UTC (permalink / raw) To: Lennart Borgman; +Cc: Óscar Fuentes, emacs-devel [-- Attachment #1: Type: text/plain, Size: 490 bytes --] Lennart Borgman writes: > On Sun, Nov 21, 2010 at 2:53 PM, Stephen J. Turnbull <stephen@xemacs.org> wrote: > > Óscar Fuentes writes: > > > > > How can a fixed format be perfect for *local* formatting? The user wants > > > to see dates on a format that is familiar to him. So ISO is just another > > > format. > > > > +1 > > "2010-11-21" - in what local is that not perfectly valid? Do we really > have Emacs users that do not understand this standard ISO format? [-- Attachment #2: Type: text/plain, Size: 167 bytes --] Who cares what they do or don't understand? What matters is presenting what they want to see to them. I personally want to see 2 010年10月21日. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-21 14:25 ` Stephen J. Turnbull @ 2010-11-21 16:07 ` Lennart Borgman 2010-11-22 4:19 ` Stephen J. Turnbull 0 siblings, 1 reply; 31+ messages in thread From: Lennart Borgman @ 2010-11-21 16:07 UTC (permalink / raw) To: Stephen J. Turnbull; +Cc: Óscar Fuentes, emacs-devel 2010/11/21 Stephen J. Turnbull <stephen@xemacs.org>: > Lennart Borgman writes: > > On Sun, Nov 21, 2010 at 2:53 PM, Stephen J. Turnbull <stephen@xemacs.org> wrote: > > > Óscar Fuentes writes: > > > > > > > How can a fixed format be perfect for *local* formatting? The user wants > > > > to see dates on a format that is familiar to him. So ISO is just another > > > > format. > > > > > > +1 > > > > "2010-11-21" - in what local is that not perfectly valid? Do we really > > have Emacs users that do not understand this standard ISO format? > > > Who cares what they do or don't understand? What matters is > presenting what they want to see to them. I personally want to see 2 > 010年10月21日. I think it matters if they understand. If they understand the ISO time format that makes it possible to have that as default. (Though as someone noticed ISO 8601 does not have a format that mixes week day with a common time string like "2010-11-21 18:20". That is quite bad in my opinion, but does not prevent the use of the standard in the time string without week day.) Having the possibility for a local time string like the one you want is of course not bad. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-21 16:07 ` Lennart Borgman @ 2010-11-22 4:19 ` Stephen J. Turnbull 2010-11-22 11:27 ` Lennart Borgman 0 siblings, 1 reply; 31+ messages in thread From: Stephen J. Turnbull @ 2010-11-22 4:19 UTC (permalink / raw) To: Lennart Borgman; +Cc: Óscar Fuentes, emacs-devel Lennart Borgman writes: > I think it matters if they understand. If they understand the ISO time > format that makes it possible to have that as default. Nobody but you is talking about the default, though. Everybody else is talking about more or less customized date/time formats. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-22 4:19 ` Stephen J. Turnbull @ 2010-11-22 11:27 ` Lennart Borgman 0 siblings, 0 replies; 31+ messages in thread From: Lennart Borgman @ 2010-11-22 11:27 UTC (permalink / raw) To: Stephen J. Turnbull; +Cc: Óscar Fuentes, emacs-devel On Mon, Nov 22, 2010 at 5:19 AM, Stephen J. Turnbull <stephen@xemacs.org> wrote: > Lennart Borgman writes: > > > I think it matters if they understand. If they understand the ISO time > > format that makes it possible to have that as default. > > Nobody but you is talking about the default, though. Everybody else > is talking about more or less customized date/time formats. Ok, thanks. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-21 13:55 ` Lennart Borgman 2010-11-21 14:25 ` Stephen J. Turnbull @ 2010-11-21 15:23 ` Harald Hanche-Olsen 1 sibling, 0 replies; 31+ messages in thread From: Harald Hanche-Olsen @ 2010-11-21 15:23 UTC (permalink / raw) To: emacs-devel + Lennart Borgman <lennart.borgman@gmail.com>: > "2010-11-21" - in what local is that not perfectly valid? Do we really > have Emacs users that do not understand this standard ISO format? Quick: What weekday is 2012-04-27? Anyhow, some users might even wish to have today's date represented as 2010W467 (also part of ISO 8601:2001, and as far as I know the only variant that includes the day of the week). - Harald ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 13:34 ` Lennart Borgman 2010-11-20 13:36 ` Lennart Borgman @ 2010-11-20 15:30 ` Eli Zaretskii 2010-11-20 15:39 ` Lennart Borgman 1 sibling, 1 reply; 31+ messages in thread From: Eli Zaretskii @ 2010-11-20 15:30 UTC (permalink / raw) To: Lennart Borgman; +Cc: emacs-devel > From: Lennart Borgman <lennart.borgman@gmail.com> > Date: Sat, 20 Nov 2010 14:34:45 +0100 > Cc: emacs-devel@gnu.org > > In my opinion we should use the international standard when it is > possible. Standard helps free software since it requires less > resources. This discussion goes nowhere, because you are missing the issue at hand. The issue at hand is how to correctly display a date with the names of the month and the week-day spelled out as strings in the locale's language. By contrast, "%Y-%m-%d" produces a numerical date, which is not what we want in time.el. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 15:30 ` Eli Zaretskii @ 2010-11-20 15:39 ` Lennart Borgman 2010-11-20 15:43 ` Eli Zaretskii 0 siblings, 1 reply; 31+ messages in thread From: Lennart Borgman @ 2010-11-20 15:39 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel On Sat, Nov 20, 2010 at 4:30 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Lennart Borgman <lennart.borgman@gmail.com> >> Date: Sat, 20 Nov 2010 14:34:45 +0100 >> Cc: emacs-devel@gnu.org >> >> In my opinion we should use the international standard when it is >> possible. Standard helps free software since it requires less >> resources. > > This discussion goes nowhere, because you are missing the issue at > hand. The issue at hand is how to correctly display a date with the > names of the month and the week-day spelled out as strings in the > locale's language. By contrast, "%Y-%m-%d" produces a numerical date, > which is not what we want in time.el. The week day is a problem, but why do we want the month spelled out? Doesn't it save our time not spell it out? Are there any Emacs users out there that can not understand the ISO time format? ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 15:39 ` Lennart Borgman @ 2010-11-20 15:43 ` Eli Zaretskii 0 siblings, 0 replies; 31+ messages in thread From: Eli Zaretskii @ 2010-11-20 15:43 UTC (permalink / raw) To: Lennart Borgman; +Cc: emacs-devel > From: Lennart Borgman <lennart.borgman@gmail.com> > Date: Sat, 20 Nov 2010 16:39:36 +0100 > Cc: emacs-devel@gnu.org > > The week day is a problem, but why do we want the month spelled out? Because it's a nice-looking display, and there's no reason not to provide it. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-19 18:42 Time string format Eli Zaretskii 2010-11-19 18:51 ` Lennart Borgman @ 2010-11-20 2:49 ` Deniz Dogan 2010-11-20 10:09 ` Eli Zaretskii 2010-11-20 3:47 ` David De La Harpe Golden 2 siblings, 1 reply; 31+ messages in thread From: Deniz Dogan @ 2010-11-20 2:49 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel 2010/11/19 Eli Zaretskii <eliz@gnu.org>: > 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". This > 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? > > In the docstring for `format-time-string': %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. One of these or a combination of multiple formats seems ideal to me. -- Deniz Dogan ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 2:49 ` Deniz Dogan @ 2010-11-20 10:09 ` Eli Zaretskii 0 siblings, 0 replies; 31+ messages in thread From: Eli Zaretskii @ 2010-11-20 10:09 UTC (permalink / raw) To: Deniz Dogan; +Cc: emacs-devel > From: Deniz Dogan <deniz.a.m.dogan@gmail.com> > Date: Sat, 20 Nov 2010 03:49:24 +0100 > Cc: emacs-devel@gnu.org > > 2010/11/19 Eli Zaretskii <eliz@gnu.org>: > > 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". This > > 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? > > > > > > 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. > > 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. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-19 18:42 Time string format Eli Zaretskii 2010-11-19 18:51 ` Lennart Borgman 2010-11-20 2:49 ` Deniz Dogan @ 2010-11-20 3:47 ` David De La Harpe Golden 2010-11-20 10:28 ` Eli Zaretskii 2 siblings, 1 reply; 31+ messages in thread From: David De La Harpe Golden @ 2010-11-20 3:47 UTC (permalink / raw) To: Emacs developers On 19/11/10 18:42, Eli Zaretskii wrote: > 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". This > is not necessarily TRT in languages other than English, Or even in English... Americans speak an English dialect but have that awkward habit of putting the month first. But that's mainly an issue when they use all-numeric dates, I expect an American could cope with "%a %d %b %Y" which is used by a lot of locales including english speaking ones - and in fact we see the "en_US.UTF-8" locale on my system apparently uses that order in its %c, unlike the "C" locale. > Would it be a good idea to have an element of language-info-alist that > provides a proper format for this? Probably not? language-info-alist is AFAICS a list of emacs' "language environments", which are not at all 1:1 to locales. Emacs does auto-pick its language env based on your locale, unless you set one explicitly (I always just set current-language-environment to UTF-8...), but e.g. it picks the same language env "English" for several locales that happen to be english-speaking, but which have different D_FMTs. # just some example locale info # nl_langinfo(D_T_FMT) is just what strftime uses for %c, # nl_langinfo(D_FMT) for %x and nl_langinfo(T_FMT) for %X # a.out just being a program that calls nl_langinfo and strftime $ export LC_ALL=C $ ./a.out '%c || %X || %x' nl_langinfo(D_T_FMT): "%a %b %e %H:%M:%S %Y" nl_langinfo(T_FMT): "%H:%M:%S" nl_langinfo(D_FMT): "%m/%d/%y" strftime("%c || %X || %x"): "Sat Nov 20 03:16:15 2010 || 03:16:15 || 11/20/10" $ export LC_ALL=en_US.UTF-8 $ ./a.out '%c || %X || %x' nl_langinfo(D_T_FMT): "%a %d %b %Y %r %Z" nl_langinfo(T_FMT): "%r" nl_langinfo(D_FMT): "%m/%d/%Y" strftime("%c || %X || %x"): "Sat 20 Nov 2010 03:16:29 AM GMT || 03:16:29 AM || 11/20/2010" $ export LC_ALL=en_IE.UTF-8 $ ./a.out '%c || %X || %x' nl_langinfo(D_T_FMT): "%a %d %b %Y %T %Z" nl_langinfo(T_FMT): "%T" nl_langinfo(D_FMT): "%d/%m/%y" strftime("%c || %X || %x"): "Sat 20 Nov 2010 03:16:38 GMT || 03:16:38 || 20/11/10" $ export LC_ALL=ga_IE.UTF-8 $ ./a.out '%c || %X || %x' nl_langinfo(D_T_FMT): "%a %d %b %Y %T %Z" nl_langinfo(T_FMT): "%T" nl_langinfo(D_FMT): "%d.%m.%y" strftime("%c || %X || %x"): "Sath 20 Samh 2010 03:17:04 GMT || 03:17:04 || 20.11.10" $ export LC_ALL=fr_FR.UTF-8 $ ./a.out '%c || %X || %x' nl_langinfo(D_T_FMT): "%a %d %b %Y %T %Z" nl_langinfo(T_FMT): "%T" nl_langinfo(D_FMT): "%d/%m/%Y" strftime("%c || %X || %x"): "sam. 20 nov. 2010 03:17:15 GMT || 03:17:15 || 20/11/2010" $ export LC_ALL=de_DE.UTF-8 $ ./a.out '%c || %X || %x' nl_langinfo(D_T_FMT): "%a %d %b %Y %T %Z" nl_langinfo(T_FMT): "%T" nl_langinfo(D_FMT): "%d.%m.%Y" strftime("%c || %X || %x"): "Sa 20 Nov 2010 03:17:23 GMT || 03:17:23 || 20.11.2010" $ export LC_ALL=ja_JP.UTF-8 $ ./a.out '%c || %X || %x' nl_langinfo(D_T_FMT): "%Y年%m月%d日 %H時%M分%S秒" nl_langinfo(T_FMT): "%H時%M分%S秒" nl_langinfo(D_FMT): "%Y年%m月%d日" strftime("%c || %X || %x"): "2010年11月20日 03時17分43秒 || 03時17分43秒 || 2010年11月20日" ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 3:47 ` David De La Harpe Golden @ 2010-11-20 10:28 ` Eli Zaretskii 2010-11-20 18:10 ` David De La Harpe Golden 0 siblings, 1 reply; 31+ messages in thread From: Eli Zaretskii @ 2010-11-20 10:28 UTC (permalink / raw) To: David De La Harpe Golden; +Cc: emacs-devel > Date: Sat, 20 Nov 2010 03:47:13 +0000 > From: David De La Harpe Golden <david@harpegolden.net> > > On 19/11/10 18:42, Eli Zaretskii wrote: > > 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". This > > is not necessarily TRT in languages other than English, > > Or even in English... Americans speak an English dialect but have that > awkward habit of putting the month first. But that's mainly an issue > when they use all-numeric dates, I expect an American could cope with > "%a %d %b %Y" which is used by a lot of locales including english > speaking ones - and in fact we see the "en_US.UTF-8" locale on my system > apparently uses that order in its %c, unlike the "C" locale. That's correct, but we could still leave the current default in time.el in the absence of a locale-specific format, because it is appropriate to the "C" locale. > > Would it be a good idea to have an element of language-info-alist that > > provides a proper format for this? > > Probably not? language-info-alist is AFAICS a list of emacs' "language > environments", which are not at all 1:1 to locales. That's true, but since I was only talking about a _date_, does it really matter? See below. > Emacs does > auto-pick its language env based on your locale, unless you set one > explicitly (I always just set current-language-environment to UTF-8...), > but e.g. it picks the same language env "English" for several locales > that happen to be english-speaking, but which have different D_FMTs. I wasn't talking about D_FMT, mind you. D_FMT is what %x produces, and time.el rightfully doesn't want to use that, because it produces a numeric date in most locales (as your sample clearly shows). > $ export LC_ALL=en_US.UTF-8 > $ ./a.out '%c || %X || %x' > nl_langinfo(D_T_FMT): "%a %d %b %Y %r %Z" > nl_langinfo(T_FMT): "%r" > nl_langinfo(D_FMT): "%m/%d/%Y" > strftime("%c || %X || %x"): "Sat 20 Nov 2010 03:16:29 AM GMT || 03:16:29 > AM || 11/20/2010" > > $ export LC_ALL=en_IE.UTF-8 > $ ./a.out '%c || %X || %x' > nl_langinfo(D_T_FMT): "%a %d %b %Y %T %Z" > nl_langinfo(T_FMT): "%T" > nl_langinfo(D_FMT): "%d/%m/%y" > strftime("%c || %X || %x"): "Sat 20 Nov 2010 03:16:38 GMT || 03:16:38 || > 20/11/10" Note that, in both these en_* locales, the date part of %c is the same: "Sat 20 Nov 2010". Are there any en_* locales (or any other locales that share the same language) which differ in that part? If there aren't, then we can use the language alone as the key. Also note that we already have languages such as "Brazilian Portuguese", which are really locale-specific variations of other languages; we could use the same trick for the date format, should we need that (if the answer to the previous questions is YES). If we want to use the locale as the key after all, we could add the format to locale-language-names instead, but that sounds less clean to me. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 10:28 ` Eli Zaretskii @ 2010-11-20 18:10 ` David De La Harpe Golden 2010-11-20 21:23 ` David De La Harpe Golden 0 siblings, 1 reply; 31+ messages in thread From: David De La Harpe Golden @ 2010-11-20 18:10 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel On 20/11/10 10:28, Eli Zaretskii wrote: > Note that, in both these en_* locales, the date part of %c is the > same: "Sat 20 Nov 2010". > Are there any en_* locales (or any other > locales that share the same language) which differ in that part? [I have to reconfigure my system to spit out that information, it's presently only generating a small subset of locales, might take a bit longer than I thought, bah] ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Time string format 2010-11-20 18:10 ` David De La Harpe Golden @ 2010-11-20 21:23 ` David De La Harpe Golden 0 siblings, 0 replies; 31+ messages in thread From: David De La Harpe Golden @ 2010-11-20 21:23 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Emacs-devel [-- Attachment #1: Type: text/plain, Size: 1996 bytes --] On 20/11/10 18:10, David De La Harpe Golden wrote: > On 20/11/10 10:28, Eli Zaretskii wrote: > >> Note that, in both these en_* locales, the date part of %c is the >> same: "Sat 20 Nov 2010". >> Are there any en_* locales (or any other >> locales that share the same language) which differ in that part? > > [I have to reconfigure my system to spit out that information, it's > presently only generating a small subset of locales, might take a bit > longer than I thought, bah] Attached please find dump of the raw info from my system. ("%a %d %b %Y" covers a lot and is quite likely still comprehensible by a lot of the others). There are some locales that differ in that part despite being the same language (following by visual inspection only, and n.b. just in case: this is only a list of the locales where the langauge is the same but the date part of the d_t_fmt different, this is not a list of locales differing from "%a %d %b %Y") *Afar (aa): - aa_DJ (Djibouti): "%a %d %b %Y" - aa_ER (Eritrea): "%A, %B %e, %Y" - aa_ET (Ethiopia): "%A, %B %e, %Y" *Arabic (ar): mostly "%d %b, %Y", except: - ar_IN (India): "%A %d %B %Y" - ar_SA (Saudi Arabia): "%A %e %B %Y" *English (en): mostly "%a %d %b %Y" (including US!) except: numeric, Y-m-d ordering - en_DK (Denmark): "%Y-%m-%d" month and day in full, month,day,year ordering: - en_HK (Hong Kong): "%A, %B %d, %Y" month and day in full, day,month,year ordering: - en_IN (India): "%A %d %B %Y" - en_PH (Philippines): "%A, %d %B, %Y" - en_SG (Sinqgapore): "%A %d,%B,%Y" *Frisian (fy): just dot after the %d in one and not the other. - fy_NL: "%a %d %b %Y" - fy_DE: "%a %d. %b %Y" *Somali (so): mostly "%A, %B %e, %Y", except: - so_DJ (Djibouti): "%a %d %b %Y" *Swedish (sv): - sv_FI (Finland): "%a %e. %Bta %Y" - sv_SE (Sweden): "%a %e %b %Y" *Chinese (zh): mosltly "%Y年%m月%d日 %A", except day in parens for: - zh_TW (Taiwan R.O.C.): "%Y年%m月%d日 (%A)" [-- Attachment #2: dump_locale_dtfmts --] [-- Type: text/plain, Size: 425 bytes --] #!/bin/bash for L in C $(awk </etc/locale.gen '{print $1}'); do if [[ ! "$L" == "tt_RU@iqtelif.UTF-8" ]]; then # buggy locale export LC_ALL=$L C=$(locale charmap) if [[ ( "$1" == "-a" ) || ( "$C" == "UTF-8" ) || ( "$C" == "ANSI_X3.4-1968" ) ]]; then echo LC_ALL="\"$L\"" locale -k language territory charmap d_t_fmt d_fmt t_fmt echo fi fi done export LC_ALL=$ORIG_LC_ALL [-- Attachment #3: locale_dtfmts.all_mixedenc.txt.gz --] [-- Type: application/x-gzip, Size: 6974 bytes --] [-- Attachment #4: locale_dtfmts.utf8only.txt.gz --] [-- Type: application/x-gzip, Size: 5050 bytes --] ^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2010-11-22 11:27 UTC | newest] Thread overview: 31+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-11-19 18:42 Time string format Eli Zaretskii 2010-11-19 18:51 ` Lennart Borgman 2010-11-19 19:03 ` Eli Zaretskii 2010-11-19 19:36 ` Lennart Borgman 2010-11-19 22:15 ` Eli Zaretskii 2010-11-20 1:25 ` Lennart Borgman 2010-11-20 9:43 ` Eli Zaretskii 2010-11-20 12:08 ` Lennart Borgman 2010-11-20 12:38 ` Eli Zaretskii 2010-11-20 13:34 ` Lennart Borgman 2010-11-20 13:36 ` Lennart Borgman 2010-11-20 15:39 ` Eli Zaretskii 2010-11-20 16:17 ` Lennart Borgman 2010-11-20 16:39 ` Eli Zaretskii 2010-11-20 16:49 ` Óscar Fuentes 2010-11-21 13:53 ` Stephen J. Turnbull 2010-11-21 13:55 ` Lennart Borgman 2010-11-21 14:25 ` Stephen J. Turnbull 2010-11-21 16:07 ` Lennart Borgman 2010-11-22 4:19 ` Stephen J. Turnbull 2010-11-22 11:27 ` Lennart Borgman 2010-11-21 15:23 ` Harald Hanche-Olsen 2010-11-20 15:30 ` Eli Zaretskii 2010-11-20 15:39 ` Lennart Borgman 2010-11-20 15:43 ` Eli Zaretskii 2010-11-20 2:49 ` Deniz Dogan 2010-11-20 10:09 ` Eli Zaretskii 2010-11-20 3:47 ` David De La Harpe Golden 2010-11-20 10:28 ` Eli Zaretskii 2010-11-20 18:10 ` David De La Harpe Golden 2010-11-20 21:23 ` David De La Harpe Golden
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).