changeset 75:360d7144ab8d draft

Simplify.
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 29 Nov 2012 12:37:02 +0900
parents 55a372e76e28
children 53e747495502
files after5.rb
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/after5.rb	Thu Nov 29 12:25:55 2012 +0900
+++ b/after5.rb	Thu Nov 29 12:37:02 2012 +0900
@@ -4,7 +4,7 @@
 # Associative Scheduling Table - after5
 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org]
 # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $
-# Last modified Thu Nov 29 12:25:27 2012 on firestorm
+# Last modified Thu Nov 29 12:35:05 2012 on firestorm
 # See http://www.gentei.org/~yuuji/software/after5/
 # このスクリプトはEUCで保存してください。
 $hgid = <<_HGID_.split[1..-2].join(" ")
@@ -1847,16 +1847,14 @@
     ## p day, last
     while column <= last
       @O.print @H.elementln("tr", nil){
-        sunday = first + (column-1)*3600*24
 	(column..column+6).collect{|d|
 	  todayp = (day.year==todayy && day.month==todaym && d==todayd)
 	  wd=d-column
-          thisday = sunday+3600*24*wd
+          thisday = first+(d-1)*3600*24
 	  hd = holiday.isHoliday(thisday.year, thisday.month, thisday.day, wd)
 	  tdclass['class'] = (hd ? 'holiday' : wname[wd])
 	  @H.element("td", tdclass){
 	    if d>0 
-	      thisday = first+(d-1)*3600*24
 	      #date = "%d/%d/%d"%[day.year, day.month, d]
 	      date = "%d/%d/%d"%[thisday.year, thisday.month, thisday.day]
 	      @H.element("p", {'class'=>todayp ? 'todayline' : 'dayline'}){

yatex.org