class Faker::Date

def forward(from: ::Date.today, days: 365)

Other tags:
    Example: if used with or without Rails (Active Support) -
    Example: if used with Rails (Active Support) -
    Example: if used with or without Rails (Active Support) -

Returns:
  • (Date) -

Parameters:
  • days (Integer) -- The maximum number of days to go into the future.
  • from (Integer) -- The start of the usable forward date range.
def forward(from: ::Date.today, days: 365)
  start_date = get_date_object(from)
  since = start_date + 1
  to = start_date + days
  between(from: since, to: to).to_date
end