Jump to content



  • Please log in to reply
No replies to this topic

#1 SlimShady


    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 20 September 2004 - 09:46 PM


I was trying to count how many days until, for instance, the next tuesday.
I remembered JdeB had a collection of new date functions.
Available http://www.autoitscript.com/fileman/users/jdeb/test/datenew.au3.
So, I was checking all the functions to see if there was a function like that.
Took me a while...
And then I made one. I'm a little tired now;
Can you test the function I made to see if it works correct?
Share your thoughts here...

;----- This part is an example----- $ToDay = 5 $NextDay = 3 $Diff = CountDiffDay($ToDay, $NextDay) MsgBox(0, "Test", "Difference in days: " & $Diff) Exit ;------------ End of example------ Func CountDiffDay($Day1, $Day2)     If $Day1 = $Day2 Then         $Count = 0     Else         If $Day2 > $Day1 Then             $Count = $Day2 - $Day1         Else             $First = 7 - $Day1             $Count = $First + $Day2         EndIf     EndIf     Return $Count EndFunc

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users