christian_calendar 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: 2c92abe7e35a2a9f1ba887096110ade4c91d3f39
4
- data.tar.gz: 006b6f9174ab1f07da29a021397c8abd26355682
3
+ metadata.gz: 71a00a7ed18b45caf96820a7aa249fa1d56cc880
4
+ data.tar.gz: f396804091f7698b73097670b00a236e37acc3f4
5
5
  SHA512:
6
- metadata.gz: 2d5d2c216671f7c1653c754b3338b9d362e5876b88d14bb4860abccf8012dd30806b2f40f304cec4d95c5e02059f42279caa4207a4d372b46355e93977fc5e19
7
- data.tar.gz: a66ad95550a83a181b59ff0fe53281f79d093815d22f988715e3979136fa985291f70a3c8e50214f411ea6994e6980981a0b87506d8077cea6104afaef381036
6
+ metadata.gz: 9a89ba05c9199bf234318e7be3daf95aca21234032d34058694b06a14203225464d2656f7a3194fee0ba6b1feea3e481cd088e0dca30fc9f859600c198a49bff
7
+ data.tar.gz: 81cf9d77ea91cbfd42bf55f233bd9f6a87373cfad3cf72232d3b31129e745eebf0df4f940729582a581c627e70f19a7a3aec2720362aade0bd3922bff858d70a
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -58,7 +58,13 @@ class ChristianCalendar
58
58
  end
59
59
 
60
60
  def to_s()
61
- to_h.map {|k,v| "%+16s: %s" % [k,v.strftime("%d-%b")]}.join("\n")
61
+
62
+ a = to_h.sort_by{|k, v| v.to_datetime}.map do |k,v|
63
+ label = k.to_s.sub(/s(?=_)/,"'s").gsub('_', ' ').split.map(&:capitalize).join(' ')
64
+ "%+16s: %s" % [label,v.strftime("%d-%b-%Y")]
65
+ end
66
+
67
+ a.join("\n")
62
68
  end
63
69
 
64
70
  def trinity_sunday()
@@ -109,4 +115,4 @@ if __FILE__ == $0 then
109
115
  cc.advent_sunday
110
116
 
111
117
  cc.to_h
112
- end
118
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: christian_calendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file