Modify

Opened 16 years ago

Closed 16 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 Changed 16 years ago by Weaponx

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 Changed 16 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

Weaponx covered it, closing as no bug.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.