Modify

Opened 18 years ago

Closed 18 years ago

#304 closed Bug (No Bug)

subtract of @MIN results in negative value

Reported by: b_clephas@… 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 Weaponx, 18 years ago

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 )

comment:2 by Valik, 18 years ago

Resolution: No Bug
Status: newclosed

Weaponx covered it, closing as no bug.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.