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
Full log
View this message in rfc822 format
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-YYYY,invalid-output-blank-line
My immediate concern is getting this to take the input as a year rather than HHMM and
it would be easier to make date more versatile than put logic around it,
$echo 2000 | date +%Y -f-
2021
not sure if anyone else would want that.
Thanks.
Mike Marchywka
306 Charles Cox Drive
Canton, GA 30115
470-758-0799
404-788-1216
________________________________________
From: Mike Marchywka
Sent: Wednesday, December 15, 2021 2:08 PM
To: coordinator <at> translationproject.org
Subject: the ubuntu "date" command info pointed me to you, question on modification
I wanted to add an option to the linux date command to
deal with pure number date stings - allowing for a 4 digit number
to be a year instead of HHMM - which should be easy
for me to do but I wanted to see how it integrates.
Also, I wanted an output option, that I could write, to
send an invalid message to stdout instead of stderr.
How should I proceed?
Thanks.
Mike Marchywka
306 Charles Cox Drive
Canton, GA 30115
470-758-0799
404-788-1216
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.