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

ruby-changes:3345

From: ko1@a...
Date: 2 Jan 2008 09:12:22 +0900
Subject: [ruby-changes:3345] tadf - Ruby:r14838 (trunk): * sample/goodfriday.rb: examples for date are enough. retired.

tadf	2008-01-02 09:12:05 +0900 (Wed, 02 Jan 2008)

  New Revision: 14838

  Removed files:
    trunk/sample/goodfriday.rb
  Modified files:
    trunk/ChangeLog

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


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/sample/goodfriday.rb
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14838&r2=14837&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14837)
+++ ChangeLog	(revision 14838)
@@ -1,3 +1,7 @@
+Wed Jan  2 09:09:53 2008  Tadayoshi Funaba  <tadf@d...>
+
+	* sample/goodfriday.rb: examples for date are enough.  retired.
+
 Wed Jan  2 08:58:54 2008  Tadayoshi Funaba  <tadf@d...>
 
 	* sample/cal.rb: just updated with the newest version.
Index: sample/goodfriday.rb
===================================================================
--- sample/goodfriday.rb	(revision 14837)
+++ sample/goodfriday.rb	(revision 14838)
@@ -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

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

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