ethiopian_date 1.2.0 → 1.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d4ab0fa723b5059d0f64d0297136086ee7348e8fa6fdda6742a8fceec52a7e1
4
- data.tar.gz: 493ac4cb8809223536546fe89651e712631fe5c7ffe0b1ed0854fde4d32044ed
3
+ metadata.gz: 9a4466c64bf806d33d3c1dc11ab6c6197b70159a373ffc309f3a09a769f74b36
4
+ data.tar.gz: fd8355f703569d434b2abb564f69b7a9a3e5bad07ad32be5815a90d0dbe40855
5
5
  SHA512:
6
- metadata.gz: 2bb2f421d5b1750670b7b46b3ed46657526d0efa0e42d56bf31cddec5c5ce560769b41e52ab768a4ee06b096374e0f306c965ed9b8fbb9cff6b440a7954e77bf
7
- data.tar.gz: 1f0746db8cbb518cd4c1eabaaf2090609936746a6c4c59c0fe9665831fc788dc9481303269fd229258cac43cdc10f5f103308741b5ae43521842908ffb4208f2
6
+ metadata.gz: 390f99a7d8a6be8c138576818951558a64a5dfaf9bc555d0eaacacf440d39c554de9c5494cfcaea299a5e819155672d4e458e96a431b2267337d6d30d3e98ef5
7
+ data.tar.gz: 0b438d87031567c0e292f561c9ee7c480f7331eeef9c45ea18969252f7c76b69472a2e18306b69b2357b8eb52111ae8bc5faa52907da3c75772355f7e3f993e0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ethiopian_date (1.1.0)
4
+ ethiopian_date (1.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EthiopianDate
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
@@ -5,7 +5,6 @@ require "date"
5
5
  module EthiopianDate
6
6
  class Error < StandardError; end
7
7
 
8
-
9
8
  # from http://ethiopic.org/Calendars/
10
9
 
11
10
  # Constants used
@@ -93,7 +92,7 @@ module EthiopianDate
93
92
  def jdn_from_gregorian(year, month, day)
94
93
  s = (year / 4) - (year - 1) / 4 - (year / 100) + (year - 1) / 100 + (year / 400) - (year - 1) / 400
95
94
  t = (14 - month) / 12
96
- n = 31 * t * (month - 1) + (1 - t) * (59 + s + 30 * (month - 3) + ((3 * month - 7) / 5)) + day - 1
95
+ n = (1 - t) * (59 + s + 30 * (month - 3) + 31 * t * (month - 1) + ((3 * month - 7) / 5)) + day - 1
97
96
  j = JD_EPOCH_OFFSET_GREGORIAN + 365 * (year - 1) + (year - 1) / 4 - (year - 1) / 100 + (year - 1) / 400 + n
98
97
  return j
99
98
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethiopian_date
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tamiru Hailu