class Faker::Date
def backward(days: 365)
-
(Date)
-
Parameters:
-
days
(Integer
) -- The maximum number of days to go into the past.
def backward(days: 365) from = ::Date.today - days to = ::Date.today - 1 between(from: from, to: to).to_date end