date_diff 0.0.2 → 0.0.3
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.
- data/README.md +4 -0
- data/lib/date_diff.rb +1 -1
- data/lib/date_diff/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
Gem which calculates how many years, months and days are there between two dates
|
4
4
|
|
5
|
+
|
6
|
+
[](http://badge.fury.io/rb/date_diff)
|
7
|
+
[](https://travis-ci.org/nithinstany/date_diff)
|
8
|
+
|
5
9
|
## Installation
|
6
10
|
|
7
11
|
Add this line to your application's Gemfile:
|
data/lib/date_diff.rb
CHANGED
@@ -15,7 +15,7 @@ class Date
|
|
15
15
|
day_difference = end_date_day - start_date_day
|
16
16
|
|
17
17
|
if (day_difference < 0)
|
18
|
-
day_difference =
|
18
|
+
day_difference = common_year_days_in_month[start_date_month-1] - start_date_day + end_date_day
|
19
19
|
end_date_month = end_date_month -1
|
20
20
|
end
|
21
21
|
|
data/lib/date_diff/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: date_diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|