1 (edited by Alth 2009-08-19 02:13:08)

Topic: Add or subtract dates.

From help I know changing times is possible:

It is possible to specify a time to add or substract to a
date. The format is the one already used for the durations.
For example:
1h        will add one hour
-60m      will substract one hour
+1h30m    will add one hour and half
-1h1m1s   will substract one hour, one minute and one second

Is it possible to changes months and years as well? I've experimented  using '%Xdo{,+1y}', etc but nothing is working.

Edit: Just multiplied the days by 24, thanks for the great program.

Re: Add or subtract dates.

Hello Alth,

You've found the solution. I just add here more explanation for users having the same issue.

As the biggest element usable is the hour, to add one year you've got to add 8760 hours (365x24) or 8784 if a February 29th is present in the interval.
The expression: %Xdo{,8760h} can do the trick.

Another solution can be to use a string replacement modifier.

Best regards