Sha256: 76f55aae9a9769a3b93ed3b1b2ca45c91396f4554dfc8af79283e67f1912b7c8
Contents?: true
Size: 618 Bytes
Versions: 125
Compression:
Stored size: 618 Bytes
Contents
# frozen_string_literal: true class ReeDatetime::AllWeek include Ree::FnDSL fn :all_week do link :now link :beginning_of_week link :end_of_week end doc(<<~DOC) Returns a Range representing the whole week of the current date/time. If no date_time passed returns the whole current week. Week is assumed to start on +week_start+ (monday or sunday). DOC contract(Nilor[DateTime], Or[:sunday, :monday] => RangeOf[DateTime]) def call(date_time = nil, start_day) date_time = date_time || now beginning_of_week(date_time, start_day)..end_of_week(date_time, start_day) end end
Version data entries
125 entries across 125 versions & 1 rubygems