Date fails on dd/mm/yyyy

Peter Flynn peter at silmaril.ie
Mon Jan 29 00:16:12 UTC 2024


(Apologies for top posting; my phone mail app has no proper editor.)

It would be simple, non-invasive, and backwards compatible to introduce a 
new option that would specify that the argument of -d was dd/mm/yyyy.


Without it, -d would continue to interpret the argument as mm/dd/yyyy so 
nothing breaks.


Peter

On 28 January 2024 22:54:10 Karl Auer <kauer at biplane.com.au> wrote:

> On Sun, 2024-01-28 at 10:59 +0000, Peter Flynn wrote:
>> Does anyone know if the date(1) utility will ever be updated to
>> accept a date in non-American dd/mm/yyyy order.
>
> Probably not. The reason is simple: ??/??/YYYY is ambiguous for many,
> many days. Is 12/06/2024 in December or June?
>
> So to do it without more information (a filter or format string) is
> impossible - one or the other has to be the default. About the closest
> you could get, maybe, would be to have the date utility honour the
> localisation settings or have a configuration file for the date
> utility. Either of these would be a huge change to a venerable and
> extremely widely used program.
>
> Generally speaking people want a date utility to be entirely
> deterministic within itself, so having the "wrong default" is the
> lesser of two evils.
>
> Regards, K.
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Karl Auer (kauer at biplane.com.au)
> http://www.biplane.com.au/kauer
>
>
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20240129/a29fd22b/attachment-0001.html>


More information about the ubuntu-users mailing list