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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e933e2020424ed914b88472cafe4e2c7634dd6afe07475f4b0b915689fe4693
4
- data.tar.gz: be0df225f53617124a675c374f41f47924da31926043a859f548e3d563bf5f6c
3
+ metadata.gz: 7260409d0d9c17a7b0f00020d5774871940e54cde85f93755543beeb136a54e3
4
+ data.tar.gz: 0720a029275da64424874156a74dfe2ed5a2b6454e95e6e2f5c9025d7b7fa020
5
5
  SHA512:
6
- metadata.gz: 61c5653b8eb7b6423c92abdc89e331aac3f8675732ffc424fb34268bb6b69b24b63d7eaefdd121d4a3e28a3ecf1bd726a5a28639f25ce3f705039b5fb9fd6f32
7
- data.tar.gz: 17015550f19920f9ce2c80e7a8e5df53f80deb44d7d6b6842f3eacd89d0eaf41cf2627274191767bacfbecd670630bdff1b95d2b8add41894eae34aeb9951289
6
+ metadata.gz: cde29693895634ce436b83f96893900ab2e55fbb832263a53d72f2525a82075f01094f58fdb32888c856de26d581ae84ee7be97880bd3f08187c675f5aba2c07
7
+ data.tar.gz: 1179663617b43bc8a98ca2cdb266607921e0f45d24ecce3027695665f9655d7ad0cb9f9da4cc4fd300c93236c188198ac9ed9fe27b40309d10fb5c913e614f13
@@ -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
@@ -1,6 +1,6 @@
1
1
 
2
2
  Gem::Specification::new do |s|
3
- version = '1.0.6'
3
+ version = '1.0.7'
4
4
 
5
5
  files = Dir.glob('**/*') + ['.yardopts'] - [
6
6
  Dir.glob('timesteps-*.gem'),
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.6
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-27 00:00:00.000000000 Z
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.1.6
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