-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Faker.Date.date_of_birth/1 with valid dates #100
Comments
Isn't there some kind of common library that can represent a range of dates (EG a range from |
Date Ranges are a 1.6 feature from the looks of things Perhaps something like this https://medium.com/@natetsai/implementing-date-ranges-in-elixir-384460f3b7fa ? or this seems very tidy https://stackoverflow.com/questions/30951318/how-to-create-a-stream-and-list-of-dates |
Fixed by MR #116
|
Right now dob can't be on 30 or 31. Suggestion is to introduce private function
to_valid_day(date, month, year)
and return maximum possible date, for example:to_valid_day(31, 9, 2017) # => 30
In case of February we'll need to check for leap year.
The text was updated successfully, but these errors were encountered: