Sha256: b07d2e6d9a6a7a427413643725d4bf93bea6f104c024b64f6ff609fcaac2812c
Contents?: true
Size: 355 Bytes
Versions: 126
Compression:
Stored size: 355 Bytes
Contents
# frozen_string_literal: true class ReeDatetime::WeeksAgo include Ree::FnDSL fn :weeks_ago do link :now link :advance end doc("Returns a new date/time the specified number of weeks ago.") contract(Nilor[DateTime], Integer => DateTime) def call(date_time = nil, week_count) advance(date_time || now, weeks: -week_count) end end
Version data entries
126 entries across 126 versions & 1 rubygems