Ingo Karkat wrote:

> On 19-Dec-2010 17:14, Dominique Pellé wrote:
> > Bram Moolenaar wrote:
> > 
> >> Thanks.  I think we also need to explain the date format.  How about
> >> this:
> >>
> >>                        The "when" column is the date and time when this
> >>                        change was made.  The four possible formats are:
> >>                            N seconds ago
> >>                            HH:MM:SS             hour, minute, seconds
> >>                            MM/DD HH:MM:SS       idem, with month and day
> >>                            YYYY/MM/DD HH:MM:SS  idem, with year
> >>
> >> And to reflect that in the example:
> >>
> >>                           number changes  when               saved ~
> >>                               88      88  2010/01/04 14:25:53
> >>                              108     107  08/07 12:47:51
> >>                              136      46  13:33:01             7
> >>                              166     164  3 seconds ago
> >>
> >> First one to actually get the year to show up gets a lolly :-).
> > 
> > That's better indeed.
> > 
> > One correction though: in source vim/src/undo.c:2887, I see
> > that the format when file is older than ~6 months is:
> >   "%y/%m/%d %H:%M:%S".
> > 
> > According to "man strftime", %y is the year _without_ the
> > century (i.e. range 00 to 99). So help file should say
> > YY/MM/DD HH:MM:SS rather than YYYY/MM/DD HH:MM:SS.
> > 
> > Or perhaps it's better to use format %Y rather than %y in
> > undo.c:2887 to show a 4 digits date. Who knows, someone
> > might thank you for that in 100 years.
> 
> Please forgive my ignorance; I don't know much about the Vim sources
> yet. But I'm wondering why the date format is hard-coded (to some
> US-English format) at all. Shouldn't something like %c / %X be used,
> so that the format is determined by the user's locale? Our
> international users will thank us for that.

The format is international, it is the only one that's accepted
worldwide and doesn't need configuration to work correctly.
Configurations often get to be wrong and users waste time correcting
that (how many times did I have to change "11:00 pm" to "22:00" by
diving deep into menus?).  And how many people know what 0:00 am and
0:00 pm mean?

> The only downside would be that the MM/DD "middle" option wouldn't be
> easily available (well, one could somehow substitute away the year
> from the full format), and that parsing of the command's output in
> scripts would be more complex. (I assume that scripts would
> temporarily do :lang time C to get a fixed format, and then restore
> the user's setting.)

-- 
hundred-and-one symptoms of being an internet addict:
30. Even though you died last week, you've managed to retain OPS on your
    favorite IRC channel.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui