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

2021-12-15 Thread Mike Marchywka
On Wed, Dec 15, 2021 at 02:09:29PM -0800, Paul Eggert wrote: > 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 ca

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

2021-12-15 Thread Paul Eggert
On 12/15/21 14:24, Mike Marchywka wrote: if date is going to be a swiss army knife for date conversions it makes some sense to allow user selection of ambiguity resolution doesn't it? There are thousands of possible data conversions and I'm not sure we want to head down the road of trying to

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

2021-12-15 Thread Paul Eggert
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,

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

2021-12-15 Thread Mike Marchywka
I'm trying to implement the options shown below. I downloaded the coreutils source for my distro and don't expect a problem compling and implementing it. However, is there any interest in adding similar functions to the main code? I would imagine something like, date --option=four-digits-are-YY