Code: Select all
test := A_Now
test -= 1 , Days ; Doesn't work
; While this Does
test += 1 , Days ; works
Code: Select all
test := A_Now
test -= 1 , Days ; Doesn't work
; While this Does
test += 1 , Days ; works
Code: Select all
test := A_Now
test += -1 , Days ; works
msgbox % test
Code: Select all
Var -= Value , TimeUnits
Code: Select all
Var1 -= 1, days
Code: Select all
MyCount -= 2
It doesn't fail when used as intended which is subtracting one date-time stamp from another.TheBeginner wrote: ↑ this is an actual example from the docs
if you use that example it will failCode: Select all
Var -= Value , TimeUnits
The EnvSub documentation states:TheBeginner wrote: ↑ is there anything in the docs mentioning a exception for the subtraction method, I've read them and I didn't find any, if you see something listed in the docs mentioning why this doesn't work do point me to it.
If present, this parameter directs the command to subtract Value from Var as though both of them are date-time stamps in the YYYYMMDDHH24MISS format.
...
To add or subtract a certain number of seconds, minutes, hours, or days from a timestamp, use EnvAdd (subtraction is achieved by adding a negative number).