Uskrs
Tuesday, September 2nd, 2008Pronasao sam kod za izracunavanje Uskrsa, po pravoslavnom i po katolickom kalendaru. Izvor: http://www.tek-tips.com/faqs.cfm?fid=5075 Pravoslavni: CREATE FUNCTION dbo.OEaster (@Yr as int) RETURNS datetime AS -- SELECT dbo.OEaster(2007) BEGIN Declare @I int, @J int, @Metonic int, @EMo int, @EDay int, @LeapAdj int Set @LeapAdj=@Yr/100-@Yr/400-2 Set @Metonic=@Yr % 19 Set @I=(19*@Metonic+15) % 30 Set @J=(@Yr+@Yr/4+@I) % 7 Set @EMo=3+(@I-@J+40)/44 ...