summaryrefslogtreecommitdiff
path: root/sample/goodfriday.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-13 05:45:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-13 05:45:20 +0000
commit65a5162550f58047974793cdc8067a970b2435c0 (patch)
tree082bb7d5568f3b2e36e3fe166e9f3039394fcf44 /sample/goodfriday.rb
parentfcd020c83028f5610d382e85a2df00223e12bd7e (diff)
1.4.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/goodfriday.rb')
-rw-r--r--sample/goodfriday.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/sample/goodfriday.rb b/sample/goodfriday.rb
new file mode 100644
index 0000000..cc541af
--- /dev/null
+++ b/sample/goodfriday.rb
@@ -0,0 +1,35 @@
+#! /usr/local/bin/ruby
+
+# goodfriday.rb: Written by Tadayoshi Funaba 1998
+# $Id: goodfriday.rb,v 1.3 1999/08/04 14:54:18 tadf Exp $
+
+require 'date2'
+require 'holiday'
+
+es = Date.easter(Date.today.year)
+[[-9*7, 'Septuagesima Sunday'],
+ [-8*7, 'Sexagesima Sunday'],
+ [-7*7, 'Quinquagesima Sunday (Shrove Sunday)'],
+ [-48, 'Shrove Monday'],
+ [-47, 'Shrove Tuesday'],
+ [-46, 'Ash Wednesday'],
+ [-6*7, 'Quadragesima Sunday'],
+ [-3*7, 'Mothering Sunday'],
+ [-2*7, 'Passion Sunday'],
+ [-7, 'Palm Sunday'],
+ [-3, 'Maunday Thursday'],
+ [-2, 'Good Friday'],
+ [-1, 'Easter Eve'],
+ [0, 'Easter Day'],
+ [1, 'Easter Monday'],
+ [7, 'Low Sunday'],
+ [5*7, 'Rogation Sunday'],
+ [39, 'Ascension Day (Holy Thursday)'],
+ [42, 'Sunday after Ascension Day'],
+ [7*7, 'Pentecost (Whitsunday)'],
+ [50, 'Whitmonday'],
+ [8*7, 'Trinity Sunday'],
+ [60, 'Corpus Christi (Thursday after Trinity)']].
+each do |xs|
+ puts ((es + xs.shift).to_s + ' ' + xs.shift)
+end