journal-cli 1.0.26 → 1.0.27

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: 4984b6fe36150316fca655279b8bff861e006da77028b78327132e711798b7e3
4
- data.tar.gz: 43d4b24bd3f27d92bf781496fad939037cf8258d34bd835b1d148010ad184806
3
+ metadata.gz: f0e13de67e2b05c78b16ff3e4c98e151c5de7b3be51079749599c804d7ea984e
4
+ data.tar.gz: e4112cccece8944e08e0b83dcdf598c0469282062622d15d0e98063a5ff85ee9
5
5
  SHA512:
6
- metadata.gz: 8cbbd48551378617d527c661a7a022735766f4f09dee40ab903c1687d23967a69e250007d5ac2a0b0e4cb3d6209d2edcb43f18ef7fbe205a0abf2cb0c2a93c04
7
- data.tar.gz: daec6aadef725293d2e4db82f69187a3230b18c31a71e8a45de28a00b47fc961f9f1020d6930cda8c374e16401cddd5fa3abcd12f8343879c645d86d476652d0
6
+ metadata.gz: 95667e40648e73f25146b6c321142ba1abba26cd9aeefc4b6209e8c86e1452e0b2dc27e066a0ef3af88ed8f46a9c4961a26de71428b3638193e233aecdda479c
7
+ data.tar.gz: 20bf7846052db8f466be5d45dde9e165d8c04a23cef87b53d304b68ce8dc7da621ac97644bda6c6944c8a99b0cec0471c8e6f4a78b4761d151c4942838d80192
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 1.0.27
2
+
3
+ 2023-09-23 08:03
4
+
5
+ #### FIXED
6
+
7
+ - Time comparisons for past entries failing when using a past date for entry
8
+
1
9
  ### 1.0.26
2
10
 
3
11
  2023-09-20 19:18
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- journal-cli (1.0.25)
4
+ journal-cli (1.0.27)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  tty-reader (~> 0.9, >= 0.9.0)
7
7
  tty-which (~> 0.5, >= 0.5.0)
@@ -10,17 +10,20 @@ class ::String
10
10
  now = Journal.date
11
11
  m = condition.match(time_rx)
12
12
  time = Chronic.parse(m['time'])
13
+ now.localtime
14
+ time.localtime
15
+ time_of_day = Time.parse("#{now.strftime('%Y-%m-%d')} #{time.strftime('%H:%M')}")
13
16
  Journal.notify("{br}Invalid time string in question (#{m['time']})", exit_code: 4) unless time
14
17
 
15
18
  case m['comp']
16
19
  when /^<=$/
17
- now <= time
20
+ now <= time_of_day
18
21
  when /^(<|bef)/i
19
- now < time
22
+ now < time_of_day
20
23
  when /^>=/
21
- now >= time
24
+ now >= time_of_day
22
25
  when /^(>|aft)/i
23
- now > time
26
+ now > time_of_day
24
27
  end
25
28
  # TODO: Other condition types
26
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Journal
4
- VERSION = '1.0.26'
4
+ VERSION = '1.0.27'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: journal-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.26
4
+ version: 1.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-21 00:00:00.000000000 Z
11
+ date: 2023-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-which