This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: Gender is something these countries use to calculate the serial/individual number(making them even or odd) | |
# It is not taken into consideration in this snippet but the generated numbers are still valid | |
require 'date' | |
age = 21 # Whatever you want it to be | |
# Randomize month and day equal to, or lower, than the current month | |
# to make sure the generated birth month and day has occurred in <current_year> | |
t = Time.new | |
year = t.year - age |