Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- birthday_past = Time.now - 18.years - 2.days
- birthday_future = Time.now - 18.years + 2.days
- ((Date.today - birthday_past.to_date) / 365).floor
- #18
- >> ((Date.today - birthday_future.to_date) / 365).floor
- #18 -> should be 17!
Add Comment
Please, Sign In to add comment