casvanluijtelaar / faker.dart

generate massive amounts of fake data in dart and flutter
Other
41 stars 7 forks source link

Error when use date.between #12

Closed mdeandrea-mrmilu closed 2 years ago

mdeandrea-mrmilu commented 2 years ago

When use date.between I had this error: RangeError: max must be in range 0 < max ≤ 2^32, was 0

Example:

final faker = Faker.instance;
faker.date.between(DateTime(2021), DateTime(2021,  12))
casvanluijtelaar commented 2 years ago

couldn't directly replicate it, but I can see how it could technically happen. I've modified the date.between to make sure it never happens. available in 0.1.11