# File lib/runt/pdate.rb, line 111 def PDate.week( yr,mon,day,*ignored ) #LJK: need to calculate which week this day implies, #and then move the day back to the *first* day in that week; #note that since rfc2445 defaults to weekstart=monday, I'm #going to use commercial day-of-week raw = PDate.day(yr, mon, day) cooked = PDate.commercial(raw.cwyear, raw.cweek, 1) PDate.civil(WEEK, cooked.year, cooked.month, cooked.day) end