Date fails on dd/mm/yyyy
Loïc Grenié
loic.grenie at gmail.com
Sun Jan 28 14:35:16 UTC 2024
On Sun Jan 28th, 2024 at 12:01, 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. It is fairly good at working out
> other date formats as input with -d but this format fails. It's fine
> when reversed (yyyy/mm/dd).
>
> I'm using the version from GNU coreutils 8.30 (September 2019). Has it
> been updated since then?
>
coreutils 9.4.3, date -d dd/mm/yyyy understands mm/dd/yyyy (american
style). I seriously doubt it will ever be changed. You'll have to adapt:
either
write a filter, or change your output (yyyy/mm/dd is not that bad: it
respect
alphabetical order as well).
Good luck,
Loïc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20240128/04e02fc0/attachment.html>
More information about the ubuntu-users
mailing list