# HG changeset patch # User HIROSE Yuuji # Date 1354160222 -32400 # Node ID 360d7144ab8d6107d9ea89cb33d9e0270f81d61d # Parent 55a372e76e28b029ef2d6c347624e948be3f7a48 Simplify. diff -r 55a372e76e28 -r 360d7144ab8d after5.rb --- 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 [yuujigentei.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'}){