Sha256: e5279e13d14dace62d1618ef79aba4e10f3014570ac3bcca19127243d81fcfd6
Contents?: true
Size: 384 Bytes
Versions: 126
Compression:
Stored size: 384 Bytes
Contents
# frozen_string_literal: true class ReeDatetime::BeginningOfHour include Ree::FnDSL fn :beginning_of_hour do link :now link :change end doc("Returns a new DateTime representing the start of the hour (ex. 13:00:00).") contract(Nilor[DateTime] => DateTime) def call(date_time = nil) date_time = date_time || now change(date_time, min: 0, sec: 0) end end
Version data entries
126 entries across 126 versions & 1 rubygems