bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use of locale in "ls" again (Re: Japanese expression of date)


From: Paul Eggert
Subject: Re: use of locale in "ls" again (Re: Japanese expression of date)
Date: Fri, 21 Dec 2001 17:31:51 -0800 (PST)

> From: Bruno Haible <address@hidden>
> Date: Fri, 21 Dec 2001 19:05:20 +0100 (CET)

> >    $ ls -l .plan .profile today
> >    -r--r--r--    1 eggert   eggert        386 1981-07-14 .plan
> >    -r--r--r--    1 eggert   eggert       4012 2001-11-20 .profile
> >    -rw-rw-r--    1 eggert   eggert          0   16:10:01 today
> 
> Fine with me. This output doesn't upset a German speaker.

OK, but we still have the problem that (under the most recent
suggestion) a file that is only a few seconds old might have
yesterday's date, which is disconcerting for night owls.

Is there an good single-character notation standing for either
"yesterday" or "today"?  That would address this problem.  I looked
through ISO 8601 and couldn't see a standard, so perhaps we could use
"-" for yesterday and space for today.  We could limit the "-
HH:MM:SS" notation to time stamps that are both within yesterday and
within the last 24 hours; that might provide a nice visual cue too.
For example, if it is 2001-12-21 17:30, you might see this output:

  $ ls -lrt
  -r--r--r--    1 eggert   eggert        386 1981-07-14 .plan
  -r--r--r--    1 eggert   eggert       4012 2001-11-20 .profile
  -rw-rw-r--    1 eggert   eggert        127 2001-12-20 yesterday-older
  -rw-rw-r--    1 eggert   eggert         12 - 18:10:01 yesterday-newer
  -rw-rw-r--    1 eggert   eggert          0   13:05:59 today-past
  -rw-rw-r--    1 eggert   eggert        134 2001-12-21 today-future


> Still you need to make a special case for the C locale,

Yes; I've been assuming that all along.  GNU 'ls' does this already.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]