Sha256: 79ecc6adbaa2c7c32ef704da0ffc061d095d824cb54fdb2aee6bb2c292945281
Contents?: true
Size: 377 Bytes
Versions: 126
Compression:
Stored size: 377 Bytes
Contents
# frozen_string_literal: true class ReeDatetime::SecondsSince include Ree::FnDSL fn :seconds_since doc("Returns a new date/time the specified number of seconds in the future.") contract(Nilor[DateTime], Integer => DateTime) def call(date_time = nil, seconds_count) date_time = date_time || DateTime.now date_time + Rational(seconds_count, 86400) end end
Version data entries
126 entries across 126 versions & 1 rubygems