Sha256: c67e30379e70082f09478861a36a9c4e40d0b0137bdcef3627f6feac1b2e3d28
Contents?: true
Size: 417 Bytes
Versions: 126
Compression:
Stored size: 417 Bytes
Contents
# frozen_string_literal: true class ReeDatetime::AllDay include Ree::FnDSL fn :all_day do link :now link :beginning_of_day link :end_of_day end doc("Returns a Range representing the whole day of the current date/time.") contract(Nilor[DateTime] => RangeOf[DateTime]) def call(date_time = nil) date_time = date_time || now beginning_of_day(date_time)..end_of_day(date_time) end end
Version data entries
126 entries across 126 versions & 1 rubygems