class Date

Public Class Methods

__origin_today__(start = Date::ITALY, year: nil, mon: nil, day: nil)
Alias for: today
today(start = Date::ITALY, year: nil, mon: nil, day: nil) click to toggle source
# File lib/keyword_arg_time/core_ext/date.rb, line 7
def today(start = Date::ITALY, year: nil, mon: nil, day: nil)
  t = __origin_today__(start)

  new(
    year || t.year,
    mon  || t.mon,
    day  || t.day,
  )
end
Also aliased as: __origin_today__

Public Instance Methods

copy(year: nil, mon: nil, day: nil) click to toggle source
# File lib/keyword_arg_time/core_ext/date.rb, line 18
def copy(year: nil, mon: nil, day: nil)
  self.class.new(
    year || self.year,
    mon  || self.mon,
    day  || self.day,
  )
end