[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6453: coreutils: date -- Add new options for ISO 8601 date formats (
From: |
Eric Blake |
Subject: |
bug#6453: coreutils: date -- Add new options for ISO 8601 date formats (-O) |
Date: |
Fri, 18 Jun 2010 08:58:00 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Mnenhy/0.8.2 Thunderbird/3.0.4 |
On 06/18/2010 01:42 AM, Jari Aalto wrote:
> Package: coreutils
> Version: 8.5
> Severity: wishlist
>
>
> I'd like to suggest adding options to cover the typical ISO 8601 dates.
> The options "O" seems to be free in date(1) manual page. Suggestions:
Nope, O is already occupied per POSIX:
http://www.opengroup.org/onlinepubs/9699919799/utilities/date.html
For example, %Oe uses different numbers than %e in some locales.
And it is documented in 'date --help' (and therefore the date man page),
under the sentence: O to use the locale's alternate numeric symbols if
available.
> The output can be produced using current option set:
>
> %Y-%m-%d 1999-12-31
> %Y-%j 1999-365
> %G-W%V-%u 1999-W52-5
> %H:%M:%S 23:59:59
Unfortunately, it seems like building the ISO formats from their
components will be be best we can do, as adding % extensions is very
difficult to justify. However, given that we already have --rfc=2822
and --rfc-3339=TIMESPEC options that provide shortcuts for building
common RFC layouts, it may make sense to add a new command-line option
--iso-8601=TIMESPEC as shortcuts for building common ISO layouts.
> References:
>
> Standard - Date - ISO 9601 (Markus Kuhn)
Did you mean 8601?
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature