comparison after5.rb @ 73:8b8cb30b78fa draft

1 day should be 3600*24 secs.
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 29 Nov 2012 12:24:58 +0900
parents 6a0c2f85faa3
children 55a372e76e28
comparison
equal deleted inserted replaced
72:6a0c2f85faa3 73:8b8cb30b78fa
2 # -*- coding: euc-jp -*- 2 # -*- coding: euc-jp -*-
3 # 3 #
4 # Associative Scheduling Table - after5 4 # Associative Scheduling Table - after5
5 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org] 5 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org]
6 # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $ 6 # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $
7 # Last modified Thu Nov 29 10:17:51 2012 on firestorm 7 # Last modified Thu Nov 29 12:24:14 2012 on firestorm
8 # See http://www.gentei.org/~yuuji/software/after5/ 8 # See http://www.gentei.org/~yuuji/software/after5/
9 # このスクリプトはEUCで保存してください。 9 # このスクリプトはEUCで保存してください。
10 $hgid = <<_HGID_.split[1..-2].join(" ") 10 $hgid = <<_HGID_.split[1..-2].join(" ")
11 $HGid$ 11 $HGid$
12 _HGID_ 12 _HGID_
1845 # create day table 1845 # create day table
1846 column = start 1846 column = start
1847 ## p day, last 1847 ## p day, last
1848 while column <= last 1848 while column <= last
1849 @O.print @H.elementln("tr", nil){ 1849 @O.print @H.elementln("tr", nil){
1850 sunday = first + (column-1)*3600 1850 sunday = first + (column-1)*3600*24
1851 (column..column+6).collect{|d| 1851 (column..column+6).collect{|d|
1852 todayp = (day.year==todayy && day.month==todaym && d==todayd) 1852 todayp = (day.year==todayy && day.month==todaym && d==todayd)
1853 wd=d-column 1853 wd=d-column
1854 thisday = sunday+3600*wd 1854 thisday = sunday+3600*wd
1855 hd = holiday.isHoliday(thisday.year, thisday.month, thisday.day, wd) 1855 hd = holiday.isHoliday(thisday.year, thisday.month, thisday.day, wd)

yatex.org