diff --git a/gramps/plugins/lib/libholiday.py b/gramps/plugins/lib/libholiday.py index 3ab5d46dc..7bf3472ae 100644 --- a/gramps/plugins/lib/libholiday.py +++ b/gramps/plugins/lib/libholiday.py @@ -1,8 +1,11 @@ +# -*- coding: utf-8 -*- +# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2008-2009 Brian G. Matherly # Copyright (C) 2009 Rob G. Healey +# Copyright (C) 2014 Vlada Perić # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -56,18 +59,17 @@ def easter(year): to the Astronomical Almanac", ed. P. K. Seidelmann (1992). Note: Ash Wednesday is 46 days before Easter Sunday. """ - c = year / 100 - n = year - 19 * (year / 19) - k = (c - 17) / 25 - i = c - c / 4 - (c - k) / 3 + 19 * n + 15 - i = i - 30 * (i / 30) - i = i - (i / 28) * (1 - (i / 28) * (29 / (i + 1)) - * ((21 - n) / 11)) - j = year + year / 4 + i + 2 - c + c / 4 - j = j - 7 * (j / 7) + c = year // 100 + n = year - 19 * (year // 19) + k = (c - 17) // 25 + i = c - c // 4 - (c - k) // 3 + 19 * n + 15 + i = i - 30 * (i // 30) + i = i - (i // 28) * (1 - (i // 28) * (29 // (i + 1)) * ((21 - n) // 11) ) + j = year + year // 4 + i + 2 - c + c // 4 + j = j - 7 * (j // 7) l = i - j - month = 3 + (l + 40) / 44 - day = l + 28 - 31 * (month / 4) + month = 3 + (l + 40) // 44 + day = l + 28 - 31 * (month // 4) return "%d/%d/%d" % (year, month, day) def julian_easter(year):