2 Commits

Author SHA1 Message Date
a6478e864b corrected copyright info 2010-03-09 13:44:21 +02:00
a2fa0e150d fixed whitespace characters 2010-03-05 20:55:49 +02:00
2 changed files with 8 additions and 8 deletions

View File

@@ -17,4 +17,4 @@ Easter eggs are nice. And this is one. But to really enjoy them, you need to kno
Released under the MIT license.
Copyright (c) 2010 Jim Myhrberg & Clark Kent.
Copyright (c) 2010 James Bond & Clark Kent.

View File

@@ -2,7 +2,7 @@ class GreekEaster
def self.at(year = nil)
date = self.easter(year)
return "In the year #{date.year}, the Greek Easter is on #{date.strftime("%d %B")}.";
return "In the year #{date.year}, the Greek Easter is on #{date.strftime("%d %B")}.";
end
def self.easter(year = nil)
@@ -13,12 +13,12 @@ class GreekEaster
c = year % 7
d = (19 * a + 16) % 30
e = (2 * b + 4 * c + 6 * d) % 7;
easter = 3 + d + e;
if easter <= 30
Time.local(year, 4, easter)
else
Time.local(year, 5, (easter - 30))
end
easter = 3 + d + e;
if easter <= 30
Time.local(year, 4, easter)
else
Time.local(year, 5, (easter - 30))
end
end
end