JohnOne Posted September 26, 2010 Share 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. Link to comment Share on other sites More sharing options...
czardas Posted September 27, 2010 Share 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 Link to comment Share on other sites More sharing options...
JohnOne Posted September 27, 2010 Author Share 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. Link to comment Share on other sites More sharing options...
czardas Posted September 27, 2010 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now