datemath is a console tool that allows you to manipulate dates mathematically.
Developer comments
Too many times we have needed to do a bit of math on a date -- say, "today + 7 days" -- but in traditional MM/DD/YYYY format this is really tricky (especially in a shell script). A result of this need we built the datemath tool which can perform these functions from the command line or from a shell script. Examples:
$ datemath today + 5
06/23/2003
$ datemath '12/25/2003 - today'
188
$ datemath today + 5 weeks
07/25/2003
when will my machine be up for one year?
$ uptime
11:09am up 317 days, 15:38, 7 users, load average: 0.16, 0.04, 0.01
$ datemath today + 365 - 317
10/24/2003
The expressions accepted by datemath are straightforward and moderately flexible. The grammer is defined to reject most things that don't make any sense (such as adding two dates together), while allowing most things that do.
Requirements:
· GNU flex
· Bison
Product's homepage
Requirements:
· GNU flex
· Bison