I am using the "date" command to perform some simple date arithmetic. The "-d" option lets me do this, but the man pages are very unclear on what is valid data. What are all the accepted options, and how do I figure that out?
I can use this command to determine the date 5 minutes ago: date -d "5-minutes-ago" +%H:%M
This command also works: date -d "-5 minutes" +%H:%M
I stumbled upon these options by accident/frustration. I don't see a "minutes-ago" or a "-X minutes" option listed in the documentation.
I would use Perl to do the arithmetic, but unfortunately I cannot install any additional Perl packages.