summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/cal.rb9
-rw-r--r--sample/goodfriday.rb8
2 files changed, 8 insertions, 9 deletions
diff --git a/sample/cal.rb b/sample/cal.rb
index f256a01a394..4e0d416f069 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)
diff --git a/sample/goodfriday.rb b/sample/goodfriday.rb
index f0027ec5dda..1c48f55d960 100644
--- a/sample/goodfriday.rb
+++ b/sample/goodfriday.rb
@@ -1,7 +1,7 @@
-#! /usr/local/bin/ruby
+#! /usr/bin/env ruby
-# goodfriday.rb: Written by Tadayoshi Funaba 1998
-# $Id: goodfriday.rb,v 1.1 1998/03/08 09:44:44 tadf Exp $
+# goodfriday.rb: Written by Tadayoshi Funaba 1998, 2000
+# $Id: goodfriday.rb,v 1.1.1.1 2000-07-16 10:25:30+09 tadf Exp $
require 'date2'
@@ -19,7 +19,7 @@ def easter(y)
if n <= 31 then [y, 3, n] else [y, 4, n - 31] end
end
-es = Date.new3(*easter(Time.now.year))
+es = Date.new(*easter(Time.now.year))
[[-9*7, 'Septuagesima Sunday'],
[-8*7, 'Sexagesima Sunday'],
[-7*7, 'Quinquagesima Sunday (Shrove Sunday)'],