On Fri, May 13, 2005 at 01:30:35AM +0100, Nic Ferrier wrote: > GNU date does not allow the date parsing pattern to be specified on > the command line. [ or with an environment variable ]
I believe this is true. > Thus: > > $ LC_TIME=en_GB.utf8 date --date "12/05/2005" > Mon Dec 5 00:00:00 GMT 2005 > but what it should really output is: > Thu May 5 00:00:00 BST 2005 Surely, "Thu May 12 00:00:00 BST 2005" ? > Are my assertions incorrect or is it indeed impossible to parse this > date with the semantics that I want? I understand how you feel. It's like letter paper all over again. Lots of software written in the USA starts off its life with simple functional scope and therefore without any appreciation of this kind of issue. Even software written in Europe frequently has significant internationalisation issues (for example lack of working support for bidi text and the distinction between number-of-bytes and number-of-characters). The problem here though is that there's just one code base in "date" for understanding dates, and the parsing is not locale aware. To be fair though, making date's parser truly locale aware is a huge task. I'm sure that the coreutils maintainers would be keen to accept contributions that improved this situation. If you feel strongly about this, why not help? Clearly you feel the issue is important. In the meantime, why not just use the ISO 8601 format, which cannot possibly be misunderstood by a program? $ date --date 2005-05-12 Thu May 12 00:00:00 BST 2005 Regards, James. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils