You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
There is currently no way to generate unique dates within a particular range. unique()->date() only allows a maximum and always uses 1970-01-01 as the minimum date. The dateTime* methods obviously return DateTimes, for which there could be up to 86,400 duplicate values for a single date rendering the unique modifier useless.
This limitation was already raised in #984, but it was closed even though the proposed solution cannot work with the unique modifier.
Proposed Solution
Add a simple dateBetween method to the DateTime provider:
Summary
There is currently no way to generate unique dates within a particular range.
unique()->date()
only allows a maximum and always uses 1970-01-01 as the minimum date. The dateTime* methods obviously return DateTimes, for which there could be up to 86,400 duplicate values for a single date rendering the unique modifier useless.This limitation was already raised in #984, but it was closed even though the proposed solution cannot work with the unique modifier.
Proposed Solution
Add a simple dateBetween method to the DateTime provider:
This is currently working well for me.
Versions
fzaninotto/faker
The text was updated successfully, but these errors were encountered: