diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-18 06:00:45 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-18 06:00:45 +0000 |
commit | 741ca76912fc71269dce5519a360f8c186e0530f (patch) | |
tree | e17dcbed96ca3425229edff91e0dd94d2b7d14b2 /sample/cal.rb | |
parent | 448e63d627bf3653da0b3dc0dcf93e161829dc71 (diff) |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/cal.rb')
-rw-r--r-- | sample/cal.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sample/cal.rb b/sample/cal.rb index f256a01a39..4e0d416f06 100644 --- a/sample/cal.rb +++ b/sample/cal.rb @@ -1,7 +1,7 @@ #! /usr/bin/env ruby # cal.rb: Written by Tadayoshi Funaba 1998-2000 -# $Id: cal.rb,v 1.10 2000/05/20 02:09:47 tadf Exp $ +# $Id: cal.rb,v 1.11 2000-07-16 10:28:50+09 tadf Exp $ require 'date2' require 'getopts' @@ -38,7 +38,7 @@ end def pict(y, m, sg) d = (1..31).detect{|d| Date.exist?(y, m, d, sg)} - fi = Date.new3(y, m, d, sg) + fi = Date.new(y, m, d, sg) fi -= (fi.jd - $k + 1) % 7 ve = (fi..fi + 6).collect{|cu| @@ -54,9 +54,8 @@ def pict(y, m, sg) gr = trans(gr) if $OPT_t ta = gr.collect{|xs| xs.join(' ')} - ca = %w(January February March April - May June July August - September October November December)[m - 1] + ca = %w(January February March April May June July + August September October November December)[m - 1] ca = ca + ' ' + y.to_s if not $OPT_y ca = ca.center($mw) |