jpdate 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/jcal +4 -3
- data/lib/jpdate/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: 345f8a5a0b7e7099e8ed209ce2ae3e1c8407bced2a832eb833ced3c2a1366456
|
4
|
+
data.tar.gz: 0ab8d6ccc65bb541fb7c625743408eb62bd9f290d94a2fac29bc4097bec1a831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaf67f084c9f54c0f9fd363c869208046896beca305e1592b54c192a26665c78f942c514659c960063b5f244cf19e800d071eddf722c4844d10e39d372362e17
|
7
|
+
data.tar.gz: a4bafe024c2baf13fa977038f238681bc96b7daa97508a3d5b732b3b72573a5d8de303ec8d903de564fb051299f39b6f4b7e984a300e19d3d4de52012b564248
|
data/bin/jcal
CHANGED
@@ -41,15 +41,16 @@ module Jcal
|
|
41
41
|
end_date = JPDate.new(y, m, -1) + (6 - JPDate.new(y, m, -1).wday)
|
42
42
|
(start_date..end_date).each_slice(7) do |week|
|
43
43
|
week.each do |date|
|
44
|
-
today_marker = date == Date.today ? "\e[7m" : ''
|
44
|
+
today_marker = date.month == m && date == Date.today ? "\e[7m" : ''
|
45
|
+
month_marker = date.month != m ? "\e[2m" : ''
|
45
46
|
holiday_name = date.holiday.to_s.rjust_ja(14)
|
46
47
|
fgcolor = case
|
47
|
-
when date.month != m then
|
48
|
+
when date.month != m then 0
|
48
49
|
when date.wday == 0, date.holiday then 31
|
49
50
|
when date.wday == 6 then 36
|
50
51
|
else 0
|
51
52
|
end
|
52
|
-
printf "\e[%dm%s%s%2d\e[0m", fgcolor, holiday_name, today_marker, date.day
|
53
|
+
printf "\e[%dm%s%s%s%2d\e[0m", fgcolor, month_marker, holiday_name, today_marker, date.day
|
53
54
|
end
|
54
55
|
puts
|
55
56
|
end
|
data/lib/jpdate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jpdate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zariganitosh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|