coptic_date 0.1.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/coptic_date.gemspec +1 -1
- data/lib/coptic_date/version.rb +1 -1
- data/lib/coptic_easter.rb +22 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGVhNWI3YTIxM2VkN2E3NDU0ODhlNDAyMDY3YTYxMTIxY2IxOTIxOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTk2YzJhMmFhMjRmNmU2YWUzNjY1YWI0NGRmZjA0OWVkOGJiNjNjMw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjdlOTY4ZDM0YTFhZTQ0ZTYzZmY2ZGU1MTlkNDg2OWU0MjljMGJjYmE2OGZl
|
10
|
+
MTUwNGQ0Yjc4MWM3ZGJjNTY3Y2E3YzYzYzNiMzhjOTRjYmJhOGI4NmVhMDc3
|
11
|
+
N2Y0ZTViNjYwOWIyNjE4ZjA0ZWVjNGQ5ZDBmOTVkYThiZTRiZWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGFmNmQyNTI2YzJhMmMyZGMwNGI4MmU1ZWNiYWUzNDE2NTY1NGIwNDg1NTI3
|
14
|
+
MzJlMjc1NTEyOWFkM2EyNTU4N2U3ZjMzNjZjYWQ5OThiNjUxM2U2NmM5ZTNk
|
15
|
+
NjU0ODA5NDhlNWM5NjU2ODk4NzI4MzMzMjExZGNiNjQ3ODc5YmU=
|
data/coptic_date.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Kamal Micheal"]
|
10
10
|
spec.email = ["kimomicho@hotmail.com"]
|
11
11
|
|
12
|
-
spec.summary = "This gem is used to convert Gregorian calendar to Coptic calendar."
|
12
|
+
spec.summary = "This gem is used to convert Gregorian calendar to Coptic calendar. It also calculate Easter Orthodox date."
|
13
13
|
spec.homepage = "https://github.com/kimomicho/coptic_date_gem"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
data/lib/coptic_date/version.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
require "coptic_date/version"
|
2
|
+
require "date"
|
3
|
+
|
4
|
+
module CopticEaster
|
5
|
+
def self.calculate_easter_date(greg_year)
|
6
|
+
# This function calculates easter date for a Gregorian year
|
7
|
+
days_to_add = (((greg_year % 19) *19) + 24) % 30
|
8
|
+
|
9
|
+
easter_date = Date.new(greg_year, 3, 21) + days_to_add
|
10
|
+
|
11
|
+
if easter_date < Date.new(greg_year, 3, 31)
|
12
|
+
easter_date += 34
|
13
|
+
else
|
14
|
+
easter_date += 4
|
15
|
+
end
|
16
|
+
|
17
|
+
begin
|
18
|
+
easter_date += 1
|
19
|
+
end while !easter_date.sunday?
|
20
|
+
return easter_date
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coptic_date
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamal Micheal
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- coptic_date.gemspec
|
71
71
|
- lib/coptic_date.rb
|
72
72
|
- lib/coptic_date/version.rb
|
73
|
+
- lib/coptic_easter.rb
|
73
74
|
homepage: https://github.com/kimomicho/coptic_date_gem
|
74
75
|
licenses:
|
75
76
|
- MIT
|
@@ -93,5 +94,6 @@ rubyforge_project:
|
|
93
94
|
rubygems_version: 2.0.7
|
94
95
|
signing_key:
|
95
96
|
specification_version: 4
|
96
|
-
summary: This gem is used to convert Gregorian calendar to Coptic calendar.
|
97
|
+
summary: This gem is used to convert Gregorian calendar to Coptic calendar. It also
|
98
|
+
calculate Easter Orthodox date.
|
97
99
|
test_files: []
|