ruby-changes:3343
From: ko1@a...
Date: 2 Jan 2008 09:04:25 +0900
Subject: [ruby-changes:3343] tadf - Ruby:r14836 (trunk): * sample/cal.rb: just updated with the newest version.
tadf 2008-01-02 09:04:08 +0900 (Wed, 02 Jan 2008)
New Revision: 14836
Modified files:
trunk/ChangeLog
trunk/sample/cal.rb
Log:
* sample/cal.rb: just updated with the newest version.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14836&r2=14835&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/sample/cal.rb?r1=14836&r2=14835&diff_format=u
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14835)
+++ ChangeLog (revision 14836)
@@ -1,3 +1,7 @@
+Wed Jan 2 08:58:54 2008 Tadayoshi Funaba <tadf@d...>
+
+ * sample/cal.rb: just updated with the newest version.
+
Wed Jan 2 01:19:31 2008 Tanaka Akira <akr@f...>
* enc/depend: dependency updated.
Index: sample/cal.rb
===================================================================
--- sample/cal.rb (revision 14835)
+++ sample/cal.rb (revision 14836)
@@ -1,7 +1,7 @@
#! /usr/bin/env ruby
-# cal.rb: Written by Tadayoshi Funaba 1998-2004
-# $Id: cal.rb,v 2.8 2004-09-25 12:50:10+09 tadf Exp $
+# cal.rb: Written by Tadayoshi Funaba 1998-2004,2006
+# $Id: cal.rb,v 2.10 2006-12-30 21:44:44+09 tadf Exp $
require 'date'
@@ -9,25 +9,25 @@
START =
{
- 'cn' => true, # China
- 'de' => 2342032, # Germany (protestant states)
- 'dk' => 2342032, # Denmark
- 'es' => 2299161, # Spain
- 'fi' => 2361390, # Finland
- 'fr' => 2299227, # France
- 'gb' => 2361222, # United Kingdom
- 'gr' => 2423868, # Greece
- 'hu' => 2301004, # Hungary
- 'it' => 2299161, # Italy
- 'jp' => true, # Japan
- 'no' => 2342032, # Norway
- 'pl' => 2299161, # Poland
- 'pt' => 2299161, # Portugal
- 'ru' => 2421639, # Russia
- 'se' => 2361390, # Sweden
- 'us' => 2361222, # United States
- 'os' => false, # (old style)
- 'ns' => true # (new style)
+ 'cn' => Date::GREGORIAN, # China
+ 'de' => 2342032, # Germany (protestant states)
+ 'dk' => 2342032, # Denmark
+ 'es' => 2299161, # Spain
+ 'fi' => 2361390, # Finland
+ 'fr' => 2299227, # France
+ 'gb' => 2361222, # United Kingdom
+ 'gr' => 2423868, # Greece
+ 'hu' => 2301004, # Hungary
+ 'it' => 2299161, # Italy
+ 'jp' => Date::GREGORIAN, # Japan
+ 'no' => 2342032, # Norway
+ 'pl' => 2299161, # Poland
+ 'pt' => 2299161, # Portugal
+ 'ru' => 2421639, # Russia
+ 'se' => 2361390, # Sweden
+ 'us' => 2361222, # United States
+ 'os' => Date::JULIAN, # (old style)
+ 'ns' => Date::GREGORIAN # (new style)
}
DEFAULT_START = 'gb'
@@ -72,7 +72,7 @@
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 + ' ' + y.to_s if !@opt_y
ca = ca.center(@mw)
ta.unshift(ca)
@@ -150,13 +150,13 @@
end
y, m = ARGV.values_at(1, 0).compact.collect{|x| x.to_i}
- cal.opt_y(true) if y and not m
+ cal.opt_y(true) if y && !m
to = Date.today
y ||= to.year
m ||= to.mon
- usage unless m >= 1 and m <= 12
+ usage unless m >= 1 && m <= 12
usage unless y >= -4712
print cal.print(y, m)
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml