mirror of
https://github.com/jimeh/greek_easter.git
synced 2026-02-18 20:36:40 +00:00
fixed whitespace characters
This commit is contained in:
@@ -2,7 +2,7 @@ class GreekEaster
|
|||||||
|
|
||||||
def self.at(year = nil)
|
def self.at(year = nil)
|
||||||
date = self.easter(year)
|
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
|
end
|
||||||
|
|
||||||
def self.easter(year = nil)
|
def self.easter(year = nil)
|
||||||
@@ -13,12 +13,12 @@ class GreekEaster
|
|||||||
c = year % 7
|
c = year % 7
|
||||||
d = (19 * a + 16) % 30
|
d = (19 * a + 16) % 30
|
||||||
e = (2 * b + 4 * c + 6 * d) % 7;
|
e = (2 * b + 4 * c + 6 * d) % 7;
|
||||||
easter = 3 + d + e;
|
easter = 3 + d + e;
|
||||||
if easter <= 30
|
if easter <= 30
|
||||||
Time.local(year, 4, easter)
|
Time.local(year, 4, easter)
|
||||||
else
|
else
|
||||||
Time.local(year, 5, (easter - 30))
|
Time.local(year, 5, (easter - 30))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user