timesteps 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/timesteps/timestep.rb +12 -0
- data/timesteps.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7260409d0d9c17a7b0f00020d5774871940e54cde85f93755543beeb136a54e3
|
4
|
+
data.tar.gz: 0720a029275da64424874156a74dfe2ed5a2b6454e95e6e2f5c9025d7b7fa020
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cde29693895634ce436b83f96893900ab2e55fbb832263a53d72f2525a82075f01094f58fdb32888c856de26d581ae84ee7be97880bd3f08187c675f5aba2c07
|
7
|
+
data.tar.gz: 1179663617b43bc8a98ca2cdb266607921e0f45d24ecce3027695665f9655d7ad0cb9f9da4cc4fd300c93236c188198ac9ed9fe27b40309d10fb5c913e614f13
|
data/lib/timesteps/timestep.rb
CHANGED
@@ -309,6 +309,18 @@ class TimeStep
|
|
309
309
|
return @origin.offset
|
310
310
|
end
|
311
311
|
|
312
|
+
# Returns the timestep object with new_offset
|
313
|
+
#
|
314
|
+
# @return [TimeStep]
|
315
|
+
#
|
316
|
+
def new_offset (offset)
|
317
|
+
obj = clone
|
318
|
+
obj.instance_eval {
|
319
|
+
@origin = @origin.new_offset(offset)
|
320
|
+
}
|
321
|
+
return obj
|
322
|
+
end
|
323
|
+
|
312
324
|
# Parses datetime string and return datetime object.
|
313
325
|
# In the parsing, the calendar of the object is used.
|
314
326
|
# If `format` option is given, `strptime` method is
|
data/timesteps.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timesteps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroki Motoyoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
|
-
rubygems_version: 3.
|
88
|
+
rubygems_version: 3.0.3
|
89
89
|
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: A library for handling discrete time series in constant increments
|