CodyEngel / fakek

A faker library for Kotlin.
Apache License 2.0
7 stars 6 forks source link

Add Fake Date #46

Open CodyEngel opened 3 years ago

CodyEngel commented 3 years ago

Add a FakeDate instance to FakeContext. Please ensure that new properties are added in alphabetical order and well documented.

Here are points of reference from the Faker library:

val date = faker.date()
date.birthday()
date.birthday(3, 18)
// Our date should use it's own TimeUnit that allows for Weeks, Months, and Years
date.future(3, TimeUnit.DAYS)
date.future(6, 3, TimeUnit.DAYS)
date.past(3, TimeUnit.DAYS)
date.past(6, 3, TimeUnit.DAYS)

This will break from normal conventions as the date instance will act as a factory for creating dates. Assigning this to myself so I can work on establishing a pattern for this style of fake.