datet 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GEM
8
8
  git (>= 1.2.5)
9
9
  rake
10
10
  rdoc
11
- json (1.7.3)
11
+ json (1.7.4)
12
12
  rake (0.9.2.2)
13
13
  rdoc (3.12)
14
14
  json (~> 1.4)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.14
1
+ 0.0.15
data/datet.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{datet}
8
- s.version = "0.0.14"
8
+ s.version = "0.0.15"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kasper Johansen"]
12
- s.date = %q{2012-07-28}
12
+ s.date = %q{2012-08-11}
13
13
  s.description = %q{A framework for handeling date- and time-related stuff in Ruby.}
14
14
  s.email = %q{k@spernj.org}
15
15
  s.extra_rdoc_files = [
data/lib/datet.rb CHANGED
@@ -1091,7 +1091,7 @@ class Datet
1091
1091
  return Datet.new(match[3], match[2], match[1])
1092
1092
  elsif match = timestr_t.match(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{5,6})$/)
1093
1093
  #Datet.code format
1094
- return Datet.new(match[1], match[2], match[3], match[4], match[5], match[6], match[7])
1094
+ return Datet.new(match[1].to_i, match[2].to_i, match[3].to_i, match[4].to_i, match[5].to_i, match[6].to_i, match[7].to_i)
1095
1095
  elsif match = timestr_t.match(/^\s*(\d{4})-(\d{1,2})-(\d{1,2})(|\s+(\d{2}):(\d{2}):(\d{2})(|\.\d+)\s*)(|\s+(utc))(|\s+(\+|\-)(\d{2})(\d{2}))$/)
1096
1096
  #Database date format (with possibility of .0 in the end - microseconds? -knj.
1097
1097
 
data/spec/datet_spec.rb CHANGED
@@ -52,6 +52,7 @@ describe "Datet" do
52
52
  date = Datet.in("1985-06-17").time
53
53
  date = Datet.in("17/06 1985").time
54
54
  date = Datet.in("2012-06-06").time
55
+ date = Datet.in("2011092709025700000").time
55
56
 
56
57
  date = Datet.in("2012-06-20T08:25:06+0000")
57
58
  raise "Expected '2012-06-20 08:25:06' but got: '#{date.dbstr}'." if date.dbstr != "2012-06-20 08:25:06"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: datet
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.14
5
+ version: 0.0.15
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kasper Johansen
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-07-28 00:00:00 +02:00
13
+ date: 2012-08-11 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- hash: -3971721243114698739
96
+ hash: 2363087989432443650
97
97
  segments:
98
98
  - 0
99
99
  version: "0"