日付の足し算とかとか
いつも以上にまとまりなし。
- 年:Date.today.year
- 月:Date.today.month
- 今年に入ってからの週の数:Date.today.cweek
- 今週の月曜日その1:Date.commercial(Date.today.year, Date.today.cweek, 1)
- 今週の月曜日その2:Date.today - Date.today.wday + 1
- 今週の日曜日:Date.commercial(Date.today.year, Date.today.cweek, 7)
- この週の日曜日は正しいのかい?:Date.valid_commercial?(@year, 52, 7)