faker icon indicating copy to clipboard operation
faker copied to clipboard

Ability to generate date with a specific format and add more attribute to person class

Open cscoderr opened this issue 2 years ago • 2 comments

I found this useful,

  • Ability to generate date with a specific format
  • Adding more attributes to a person which includes (Date of birth, Phone Number etc) Was using date and person to generate some data and i found out this is missing

Thanks for the great library.

cscoderr avatar May 08 '22 02:05 cscoderr

DateFormat('yyyy-MM-dd HH:mm:ss').format(faker.date.dateTime(minYear: 2021, maxYear: 2022));

You could format your date like this using intl https://pub.dev/packages/intl

per-johansson-74 avatar May 23 '22 06:05 per-johansson-74

Wow thats a great work around but i just think it should be there instead of going through the route of adding another library

cscoderr avatar May 28 '22 22:05 cscoderr