Re: Date can dish it out, but not parse it back in

2009-01-15 Thread Jim Meyering
jida...@jidanni.org wrote:
> OK, better add after
> `-d DATESTR'
> `--date=DATESTR'
>  Display the date and time specified in DATESTR instead of the
>  current date and time.  DATESTR can be in almost any common
>  format.
> That it wants ASCII...
>
> P.S., nobody saw my
> http://lists.gnu.org/archive/html/bug-coreutils/2009-01/msg00051.html

Hi Dan,

I understand your point, but the title makes it clear it's "dirty",
and there's a pretty clear caveat at the end:

However, if your cloned directory is for a one-shot patch submission and
you're going to remove it right afterwards, then this approach is fine.
Otherwise, for a more sustainable (and more generally useful, IMHO)
process, read on about "topic" branches.

My goal was to make it as easy as possible even for those in a
big hurry (and for those where hearing VC "branch" triggers a
negative reaction ;-) to do the right thing.

> http://lists.gnu.org/archive/html/bug-coreutils/2009-01/msg00085.html

Please propose an addition to --help to make it say what you'd like.
You often have good suggestions, but we're much more likely to take
action on them if/when you provide patches.  This is part of the
reason for trying to make the patch-submission process as quick
and easy as possible.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: Date can dish it out, but not parse it back in

2009-01-15 Thread jidanni
OK, better add after
`-d DATESTR'
`--date=DATESTR'
 Display the date and time specified in DATESTR instead of the
 current date and time.  DATESTR can be in almost any common
 format.
That it wants ASCII...

P.S., nobody saw my
http://lists.gnu.org/archive/html/bug-coreutils/2009-01/msg00051.html
http://lists.gnu.org/archive/html/bug-coreutils/2009-01/msg00085.html


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: Date can dish it out, but not parse it back in

2009-01-15 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to jida...@jidanni.org on 1/15/2009 9:50 AM:
> Date can dish it out, but not parse it back in, for other languages:

Thanks for the report.  However, this is a known design limitation - there
is no way to write a generic date parser that can parse all localized date
strings, so we can only parse non-localized strings (such as ISO formats)
and common C locale strings (which happen to be mostly English, sorry
about that).  But it would be nice if someone wanted to write a new option
to date, perhaps named --strptime, which calls strptime on the counterpart
date string given a formatting argument that looks similar to what the +
option passes on to strftime.  That way, the user can bypass the
generalized date parser in favor of a localized parser that understands
the user's preferred format.

- --
Don't work too hard, make some time for fun as well!

Eric Blake e...@byu.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklv34wACgkQ84KuGfSFAYAYIgCgt07+/14OwsFV1Btilc1Mwk/s
mDYAniAZlCOdyRYEFyTFAbvZE6lA3npq
=rtEN
-END PGP SIGNATURE-


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Date can dish it out, but not parse it back in

2009-01-15 Thread jidanni
Date can dish it out, but not parse it back in, for other languages:
$ date
五  1月 16 00:49:11 CST 2009
$ date|date -f -
五  1月 16 00:00:00 CST 2009
$ LC_ALL=C date|date -f -
五  1月 16 00:49:26 CST 2009
$ locale
LANG=zh_TW.UTF-8
LC_CTYPE=zh_TW.UTF-8
LC_NUMERIC="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_COLLATE=C
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES=C
LC_PAPER="zh_TW.UTF-8"
LC_NAME="zh_TW.UTF-8"
LC_ADDRESS="zh_TW.UTF-8"
LC_TELEPHONE="zh_TW.UTF-8"
LC_MEASUREMENT="zh_TW.UTF-8"
LC_IDENTIFICATION="zh_TW.UTF-8"
LC_ALL=
$ date --version
date (GNU coreutils) 6.10


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils