|
From: | Paul Eggert |
Subject: | 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 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 |
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-
[Prev in Thread] | Current Thread | [Next in Thread] |