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