Class: ReeDate::EndOfWeek

Inherits:
Object
  • Object
show all
Includes:
Ree::FnDSL
Defined in:
lib/ree_lib/packages/ree_date/package/ree_date/functions/end_of_week.rb

Instance Method Summary collapse

Instance Method Details

#call(date = nil, week_start) ⇒ Object



22
23
24
25
# File 'lib/ree_lib/packages/ree_date/package/ree_date/functions/end_of_week.rb', line 22

def call(date = nil, week_start)
  date = date || today
  days_since(date, 6 - days_to_week_start(date, week_start))
end