Method: RiCal::FastDateTime#start_of_week_with_wkst
- Defined in:
- lib/ri_cal/fast_date_time.rb
#start_of_week_with_wkst(wkst) ⇒ Object
Return a DateTime which is the beginning of the first day on or before the receiver with the specified wday
200 201 202 203 204 205 |
# File 'lib/ri_cal/fast_date_time.rb', line 200 def start_of_week_with_wkst(wkst) wkst ||= 1 date = @date date -= 1 while date.wday != wkst date end |