JohnOne 1,603 Posted September 26, 2010 You how you always need to check if its easter sunday on a certain date in a couple of years. ConsoleWrite(_IsEasterSunday(31,3,2013) & @LF); d m yyyy Func _IsEasterSunday($iday, $imonth, $iyear) If $iyear < 1 Or $iyear > 9999 Then Return False Exit EndIf $a = Mod($iyear, 19) $b = Mod($iyear, 4) $c = Mod($iyear, 7) $d = Mod(19 * $a + 24, 30) $e = Mod(2 * $b + 4 * $c + 6 * $d + 5, 7) $sunday = 22 + $d + $e $month = 3 If $sunday > 31 Then $month = 4 $sunday -= 31 EndIf If $iday = $sunday And $imonth = $month Then Return True Else Return False EndIf EndFunc Sorry I couldnt find on on the forum. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
czardas 1,269 Posted September 27, 2010 Hehe, I had a go at this, but your version is much simpler. See EasterHodges There is also a link to the page where I got the algorithm. There are several different methods. operator64 ArrayWorkshop Share this post Link to post Share on other sites
JohnOne 1,603 Posted September 27, 2010 Dont know how I missed that, I probaby searched eastersunday Someone sent the formula over a chat window, (riveting stuff it was) Dosent mothers day (UK) change too? I wonder if theres a formula for that. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
czardas 1,269 Posted September 27, 2010 I find it quite annoying when all these dates keep changing. Didn't they try and change St. Patricks day a year ago. I suppose it's one of those social phenomenons. Still it would be useful to have a varied library of international public holiday dates. It would be pretty useful for international stuff. operator64 ArrayWorkshop Share this post Link to post Share on other sites