Modify ↓
Opened 18 years ago
Closed 18 years ago
#304 closed Bug (No Bug)
subtract of @MIN results in negative value
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.2.12.0 | Severity: | None |
| Keywords: | Cc: |
Description
Whenever I subtract a number of @MIN (or the other date/time macros), I get negative values. The values should wrap around.
According to the documentation, the values are in the range 00->59 for @MIN.
MsgBox(0, "", (@MIN - 10)) ; test if time just past the whole hour MsgBox(0, "", (@WDAY - 10)) ; test whenever you like
Attachments (0)
Change History (2)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Weaponx covered it, closing as no bug.
Note:
See TracTickets
for help on using tickets.

WTF are you talking about wrap around? These macros are no different than any other number. If @MIN equals 5 and you subtract 10 you get -5. If you are expecting something else you use:
;Subtract 10 minutes from current time
$sNewDate = _DateAdd( 'n',-10, _NowCalc())
MsgBox( 4096, "", "Current time -10 minutes: " & $sNewDate )