Date fails on dd/mm/yyyy
Karl Auer
kauer at biplane.com.au
Sun Jan 28 22:53:40 UTC 2024
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
More information about the ubuntu-users
mailing list