Class: ReeDatetime::PrevOccurring
- Inherits:
-
Object
- Object
- ReeDatetime::PrevOccurring
- Includes:
- Ree::FnDSL
- Defined in:
- lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/prev_occurring.rb
Instance Method Summary collapse
Instance Method Details
#call(date_time = nil, week_day) ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/prev_occurring.rb', line 33 def call(date_time = nil, week_day) date_time = date_time || now change( prev_occurring(date_time, week_day), hour: date_time.hour, min: date_time.min, sec: date_time.sec ) end |