class Faker::Date
def birthday(min_age: 18, max_age: 65)
-
(Date)
-
Parameters:
-
max_age
(Integer
) -- The maximum age that the birthday would imply. -
min_age
(Integer
) -- The minimum age that the birthday would imply.
def birthday(min_age: 18, max_age: 65) t = ::Date.today from = birthday_date(t, max_age) to = birthday_date(t, min_age) between(from: from, to: to).to_date end