vgcal 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vgcal/handlers/describer.rb +14 -1
- data/lib/vgcal/version.rb +1 -1
- 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: 1f2ba5f62ae3dd869ed7b5eaef189f25ebbecddee60408f8528fc8eb1b217d4b
|
4
|
+
data.tar.gz: 16a195745c418aea16fcbe932f147f1af52b3b78bbfd0bba64db55ae7fc4385f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ec7dbc1d20f526d5e4c0ea697c5e39086c14f311b55abe9f54f97adf21251b3a96799f187e6a936366bb81d713a7550ea1f4f37c730d323edf2a9cf4834b2b1
|
7
|
+
data.tar.gz: cdbd109ea008b34cd57b208df40af3edf59e9b21de9c18ce7197a8d9ba00544b1b7103e946bc283ab7a917bb73a65de15a2d134b8c45a7d6d9c2c81ae8983e2a
|
@@ -22,6 +22,7 @@ module Vgcal
|
|
22
22
|
|
23
23
|
option :date, type: :string, aliases: '-d', desc: 'Show relative date. ex.-1, +10'
|
24
24
|
option :'current-week', type: :string, aliases: '-c', desc: 'Show current week tasks'
|
25
|
+
option :'next-week', type: :string, aliases: '-n', desc: 'Show next week tasks'
|
25
26
|
option :'start-date', type: :numeric, aliases: '-s', desc: 'Start date. ex.20210701'
|
26
27
|
option :'end-date', type: :numeric, aliases: '-e', desc: 'End date. ex.20210728'
|
27
28
|
|
@@ -62,7 +63,13 @@ module Vgcal
|
|
62
63
|
if Date.today.sunday?
|
63
64
|
Date.today.to_s
|
64
65
|
else
|
65
|
-
(Date.today - Date.today.wday
|
66
|
+
(Date.today - Date.today.wday).to_s
|
67
|
+
end
|
68
|
+
elsif options[:'next-week']
|
69
|
+
if Date.today.sunday?
|
70
|
+
(Date.today + 7).to_s
|
71
|
+
else
|
72
|
+
(Date.today + Date.today.wday - 1).to_s
|
66
73
|
end
|
67
74
|
elsif options[:date]
|
68
75
|
case options[:date][0]
|
@@ -88,6 +95,12 @@ module Vgcal
|
|
88
95
|
else
|
89
96
|
(Date.today + (6 - Date.today.wday)).to_s
|
90
97
|
end
|
98
|
+
elsif options[:'next-week']
|
99
|
+
if Date.today.sunday?
|
100
|
+
(Date.today + 7).to_s
|
101
|
+
else
|
102
|
+
(Date.today + 7 + (6 - Date.today.wday)).to_s
|
103
|
+
end
|
91
104
|
elsif options[:date]
|
92
105
|
case options[:date][0]
|
93
106
|
when '+'
|
data/lib/vgcal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vgcal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shota Ito
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|