duration_time 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -5,9 +5,7 @@ Usage:
5
5
 
6
6
  # Assume that today is 2013-07-07
7
7
  require 'duration_time'
8
- reg_time = Time.new(2011,8,2,0,0,0, "+08:00")
9
- # You can use reg_time = Date.parse("2011-08-02") if you have included
10
- # gem active_support!
8
+ reg_time = Time.new(2011,8,2)
11
9
  duration_time( reg_time )
12
10
  # => {
13
11
  # :years=>[2011, 2012, 2013],
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "duration_time"
5
- s.version = "1.0.0"
5
+ s.version = "1.0.1"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["debbbbie"]
8
8
  s.email = ["debbbbie@163.com.com"]
@@ -1,5 +1,5 @@
1
1
 
2
- def get_duration_time(reg_date, current_date = Time.now, include_current_year_month = false)
2
+ def duration_time(reg_date, current_date = Time.now, include_current_year_month = false)
3
3
  to_current_year_month = include_current_year_month ? current_date.month : current_date.month - 1
4
4
 
5
5
  years = (reg_date.year..current_date.year).to_a; months = []; quarters = []
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duration_time
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - debbbbie