[前][次][番号順一覧][スレッド一覧]

ruby-changes:3347

From: ko1@a...
Date: 2 Jan 2008 09:19:16 +0900
Subject: [ruby-changes:3347] tadf - Ruby:r14840 (ruby_1_8): * sample/goodfriday.rb: examples for date are enough. retired.

tadf	2008-01-02 09:19:06 +0900 (Wed, 02 Jan 2008)

  New Revision: 14840

  Removed files:
    branches/ruby_1_8/sample/goodfriday.rb
  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/sample/README

  Log:
    * sample/goodfriday.rb: examples for date are enough.  retired.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=14840&r2=14839&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/sample/goodfriday.rb
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/sample/README?r1=14840&r2=14839&diff_format=u

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 14839)
+++ ruby_1_8/ChangeLog	(revision 14840)
@@ -1,3 +1,7 @@
+Wed Jan  2 09:18:11 2008  Tadayoshi Funaba  <tadf@d...>
+
+	* sample/goodfriday.rb: examples for date are enough.  retired.
+
 Wed Jan  2 09:06:55 2008  Tadayoshi Funaba  <tadf@d...>
 
 	* sample/cal.rb: just updated with the newest version.
Index: ruby_1_8/sample/goodfriday.rb
===================================================================
--- ruby_1_8/sample/goodfriday.rb	(revision 14839)
+++ ruby_1_8/sample/goodfriday.rb	(revision 14840)
@@ -1,48 +0,0 @@
-#! /usr/bin/env ruby
-
-# goodfriday.rb: Written by Tadayoshi Funaba 1998, 2000, 2002
-# $Id: goodfriday.rb,v 1.1 1998-03-08 18:44:44+09 tadf Exp $
-
-require 'date'
-
-def easter(y)
-  g = (y % 19) + 1
-  c = (y / 100) + 1
-  x = (3 * c / 4) - 12
-  z = ((8 * c + 5) / 25) - 5
-  d = (5 * y / 4) - x - 10
-  e = (11 * g + 20 + z - x) % 30
-  e += 1 if e == 25 and g > 11 or e == 24
-  n = 44 - e
-  n += 30 if n < 21
-  n = n + 7 - ((d + n) % 7)
-  if n <= 31 then [y, 3, n] else [y, 4, n - 31] end
-end
-
-es = Date.new(*easter(Time.now.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
Index: ruby_1_8/sample/README
===================================================================
--- ruby_1_8/sample/README	(revision 14839)
+++ ruby_1_8/sample/README	(revision 14840)
@@ -21,7 +21,6 @@
 from.rb		scan mail spool
 fullpath.rb	convert ls -lR to fullpath format
 getopts.test	test fot getopt.rb
-goodfriday.rb	print various christian calendar event.
 io.rb		io test
 irb.rb		interactive ruby
 less.rb		front end for less

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]