jpdate 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/jcal +4 -3
  3. data/lib/jpdate/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ac9f16896573df4c1c8d4f872cd0d9c73826b422ef8ff6ded907e85ad9537bf
4
- data.tar.gz: ebb50bbb8f78bc323bb25532f7a7924db84879658cccc5b00da63a8cadd3bc2e
3
+ metadata.gz: 345f8a5a0b7e7099e8ed209ce2ae3e1c8407bced2a832eb833ced3c2a1366456
4
+ data.tar.gz: 0ab8d6ccc65bb541fb7c625743408eb62bd9f290d94a2fac29bc4097bec1a831
5
5
  SHA512:
6
- metadata.gz: fa277c4ea8ff1120a0ce9a015c90c06c1e83681cb0ab2adb070e6c6c609b8b6982508ba59358a7beb0440516e2c7d527cb925be7bc3f83fe8fd99261073db776
7
- data.tar.gz: 711716604b7b7e3514d98be6bee773bd759b329ae444aa36734ee40e0a04aa09cb5a6bb98cf92115aaf8d993ed5fdb21c53ee054fadfc6dc68c7979babba8a1e
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 37
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
@@ -5,5 +5,5 @@
5
5
  require 'date'
6
6
 
7
7
  class JPDate < Date
8
- VERSION = "0.2"
8
+ VERSION = "0.2.1"
9
9
  end
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: '0.2'
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-16 00:00:00.000000000 Z
11
+ date: 2018-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler