Is there a command line calendar calculation which provides these features?
- Date (plus|minus) date interval calculation
- User specified input and output format
For example, November 1 plus 3 weeks is
Here are some examples from the man page:
In the Europe/London timezone, the command:
where it is currently Mon Aug 4 04:15:24 BST 1997.
will display the last day of February in the year 2000:
So will do the command:
because there is no such date as the 30th of February.
will display the last Friday of the month:
where it is currently Mon Aug 4 04:31:11 BST 1997.
sets the date to ``June 13, 1985, 4:27 PM''.
may be used on one machine to print out the date suitable for setting on another.
sets the time to 2:32 PM, without modifying the date.
Finally the command:
can be used to parse the output from date and express it in Epoch time.
Like Zoredache says, you can easily achieve it using any scripting programming language.
Here is an example in Ruby