Sha256: 37441c6f4e94f68a6a0680623621d5de464440631e90ea7e678fbeb77b4b6a46
Contents?: true
Size: 369 Bytes
Versions: 124
Compression:
Stored size: 369 Bytes
Contents
# frozen_string_literal: true class ReeDatetime::YearsSince include Ree::FnDSL fn :years_since do link :now link :advance end doc("Returns a new date/time the specified number of years in the future.") contract(Nilor[DateTime], Integer => DateTime) def call(date_time = nil, year_count) advance(date_time || now, years: +year_count) end end
Version data entries
124 entries across 124 versions & 1 rubygems