GNU bug report logs - #52525
wanted to add option to date command to handle pure numeric input in varying ways and output for invalid dates

Previous Next

Package: coreutils;

Reported by: Mike Marchywka <marchywka <at> hotmail.com>

Date: Wed, 15 Dec 2021 21:58:01 UTC

Severity: wishlist

Full log


Message #8 received at 52525 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Mike Marchywka <marchywka <at> hotmail.com>
Cc: 52525 <at> debbugs.gnu.org
Subject: Re: bug#52525: wanted to add option to date command to handle pure
 numeric input in varying ways and output for invalid dates
Date: Wed, 15 Dec 2021 14:09:29 -0800
On 12/15/21 12:39, Mike Marchywka wrote:
> $echo 2000 | date +%Y -f-
> 2021

How about this instead? The idea is to avoid adding features if they can 
easily be implemented with some other standard utility. This way, you 
can write your shell scripts now rather than waiting for a future fix 
(plus, it keeps 'date' simpler).

echo 2000 | sed 's/$/-07-01/' | date +%Y -f-





This bug report was last modified 3 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.