when_easter 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -2
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/when_greek_easter +5 -0
- data/bin/when_roman_easter +5 -0
- data/lib/when_easter.rb +16 -3
- data/when_easter.gemspec +4 -2
- metadata +7 -3
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# when_easter
|
2
2
|
|
3
|
-
Ever wondered when will Easter (or Passover, if you prefer) be next year? No worries, use
|
3
|
+
Ever wondered when will Easter (or Passover, if you prefer) be next year? No worries, use when_easter!
|
4
4
|
|
5
5
|
### Install
|
6
6
|
$ gem install when_easter
|
@@ -15,6 +15,13 @@ Ever wondered when will Easter (or Passover, if you prefer) be next year? No wor
|
|
15
15
|
In the year 2010, the Roman Easter is on 04 April.
|
16
16
|
In the year 2010, the Greek Easter is on 04 April.
|
17
17
|
|
18
|
+
If you want to find only one date, you can also try
|
19
|
+
|
20
|
+
$ when_roman_easter
|
21
|
+
or
|
22
|
+
|
23
|
+
$ when_greek_easter
|
24
|
+
|
18
25
|
### License
|
19
26
|
|
20
27
|
Released under the MIT license.
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ begin
|
|
8
8
|
gemspec.description = "A tool that calculates the dates of Roman and Greek Easter."
|
9
9
|
gemspec.email = "michal@nierebinski.pl"
|
10
10
|
gemspec.homepage = "https://github.com/Loyolny/when_easter"
|
11
|
-
gemspec.executables = ["when_easter"]
|
11
|
+
gemspec.executables = ["when_easter","when_roman_easter","when_greek_easter"]
|
12
12
|
gemspec.authors = ["Michał Nierebiński"]
|
13
13
|
gemspec.date = File.utime(0,0,'VERSION')
|
14
14
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/lib/when_easter.rb
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
class WhenEaster
|
2
|
-
##
|
3
|
-
##=> In the year
|
2
|
+
## WhenEaster.find
|
3
|
+
##=> In the year 2011, the Roman Easter is on 24 April. \n In the year 2011, the Greek Easter is on 24 April.
|
4
4
|
def self.find(year = nil)
|
5
5
|
roman_date = self.roman_easter(year)
|
6
6
|
greek_date = self.greek_easter(year)
|
7
|
-
return "In the year #{roman_date.year}, the Roman
|
7
|
+
return "In the year #{roman_date.year}, the Roman Easter is on #{roman_date.strftime("%d %B")}. \nIn the year #{greek_date.year}, the Roman Easter is on #{greek_date.strftime("%d %B")}."
|
8
8
|
end
|
9
9
|
|
10
|
+
## WhenEaster.find_roman
|
11
|
+
##=> In the year 2011, the Roman Easter is on 24 April.
|
12
|
+
def self.find_roman(year = nil)
|
13
|
+
date = self.roman_easter(year)
|
14
|
+
return "In the year #{date.year}, the Roman Easter is on #{date.strftime("%d %B")}."
|
15
|
+
end
|
16
|
+
|
17
|
+
## WhenEaster.find_greek
|
18
|
+
##=> In the year 2011, the Greek Easter is on 24 April.
|
19
|
+
def self.find_greek(year)
|
20
|
+
date = self.greek_easter(year)
|
21
|
+
return "In the year #{date.year}, the Greek Easter is on #{date.strftime("%d %B")}."
|
22
|
+
end
|
10
23
|
## WhenEaster.roman_easter
|
11
24
|
## => Sun Apr 24 00:00:00 +0200 2011
|
12
25
|
def self.roman_easter(year = nil)
|
data/when_easter.gemspec
CHANGED
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{when_easter}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Michał Nierebiński}]
|
12
12
|
s.date = %q{2011-06-28}
|
13
13
|
s.description = %q{A tool that calculates the dates of Roman and Greek Easter.}
|
14
14
|
s.email = %q{michal@nierebinski.pl}
|
15
|
-
s.executables = [%q{when_easter}]
|
15
|
+
s.executables = [%q{when_easter}, %q{when_roman_easter}, %q{when_greek_easter}]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"README.md"
|
18
18
|
]
|
@@ -21,6 +21,8 @@ Gem::Specification.new do |s|
|
|
21
21
|
"Rakefile",
|
22
22
|
"VERSION",
|
23
23
|
"bin/when_easter",
|
24
|
+
"bin/when_greek_easter",
|
25
|
+
"bin/when_roman_easter",
|
24
26
|
"lib/when_easter.rb",
|
25
27
|
"when_easter.gemspec"
|
26
28
|
]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: when_easter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Micha\xC5\x82 Nierebi\xC5\x84ski"
|
@@ -22,6 +22,8 @@ description: A tool that calculates the dates of Roman and Greek Easter.
|
|
22
22
|
email: michal@nierebinski.pl
|
23
23
|
executables:
|
24
24
|
- when_easter
|
25
|
+
- when_roman_easter
|
26
|
+
- when_greek_easter
|
25
27
|
extensions: []
|
26
28
|
|
27
29
|
extra_rdoc_files:
|
@@ -31,6 +33,8 @@ files:
|
|
31
33
|
- Rakefile
|
32
34
|
- VERSION
|
33
35
|
- bin/when_easter
|
36
|
+
- bin/when_greek_easter
|
37
|
+
- bin/when_roman_easter
|
34
38
|
- lib/when_easter.rb
|
35
39
|
- when_easter.gemspec
|
36
40
|
homepage: https://github.com/Loyolny/when_easter
|