class Person: Any

FakeDataProvider implementation class for functionality not covered by the standard dictionary files.

Methods

birthDate

fun birthDate(age: Long, at: LocalDate): LocalDate

Returns a pseudo-random birthDate as LocalDate for the given age value.

If the at date parameter is not provided, then LocalDate.now is used to calculate the "lower bound" for the resulting birthDate. Assuming the age value of 30, the resulting date will be in the range of:


val start = LocalDate.now().minusYears(30)
val end = LocalDate.now().minusYears(29).minusDays(1)

Parameters

Name Description
age: Long

the person's age for which the birthDate will be calculated

at: LocalDate

a date at which the person was of the specified age. Equals to the result of LocalDate.now by default

ReturnValue

Name Description
LocalDate

a pseudo-randomly calculated birthDate as instance of LocalDate