hmtime 0.2.0 → 0.2.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/hmtime/version.rb +1 -1
- data/lib/hmtime.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 331e14c0af60ef2a2618c16a13399f74e9ec975f168f4acca1acc43393aa64c8
|
4
|
+
data.tar.gz: 4f89bf0fdd527ca08799a7c1e87c2ec1e59e8201d217e530353a3706097e2b6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc55d9771061d1a9f59090c4baf65c7a792e48fd710b57b4c45c33811cf1957fbac77b75596328feea6b43ba30ad9c85bb31debb70fb46268267413d0c9f044f
|
7
|
+
data.tar.gz: f7bb00ccd8174765d68eed8de58a2caecc19747db38dd3aabeb6fc569ec1b03c29272b3e5ad7563549e65bf1cd0f88bab75fc4ee1c7e00455380d3b071a2dc52
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.2.1] -2024-03-14
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
|
12
|
+
- Added parenthesis to clarify '-' operator due to ambiguous first argument warning
|
13
|
+
- ">59" error that should've been assed on minutes, but was instead assessed on hours
|
14
|
+
|
8
15
|
## [0.1.2] - 2024-03-14
|
9
16
|
|
10
17
|
### Added
|
data/lib/hmtime/version.rb
CHANGED
data/lib/hmtime.rb
CHANGED
@@ -110,13 +110,14 @@ class HMTime
|
|
110
110
|
arguments = ['',0,0]
|
111
111
|
end
|
112
112
|
|
113
|
+
is_negative = arguments[0] == '-'
|
114
|
+
hours, minutes = arguments[1,2].collect{|arg| arg.to_i}
|
115
|
+
|
113
116
|
### How to do a warning?? Is this correct?
|
114
|
-
if
|
117
|
+
if minutes.to_i > 59
|
115
118
|
warn "Warning: The mm (minutes) field of `hhh:mm` should be no greater than 59."
|
116
119
|
end
|
117
120
|
|
118
|
-
is_negative = arguments[0] == '-'
|
119
|
-
hours, minutes = arguments[1,2].collect{|arg| arg.to_i}
|
120
121
|
|
121
122
|
return (is_negative ? -1 : 1) * ((hours * 60) + minutes)
|
122
123
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hmtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Dvorak
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|