View Source Fixtures.Time (Fixtures v0.0.11)

Time and date related generators.

Summary

Functions

Generate a random date of birth up to a 100 years old.

Generate a random date of birth up to a 100 years old.

Generate a random timestamp.

Generate a random timestamp.

Functions

Link to this function

date_of_birth(opts \\ [])

View Source
@spec date_of_birth(Keyword.t()) :: Date.t()

Generate a random date of birth up to a 100 years old.

Options

  • :age the following value formats are accepted:
    • from..to a date of birth for someone with an age between from and to. (inclusive)
    • integer a date of birth for someone with the given age.
  • :from
  • :to
Link to this function

date_of_birth(settings, key, opts \\ [])

View Source
@spec date_of_birth(Keyword.t(), atom(), Keyword.t()) :: Date.t()

Generate a random date of birth up to a 100 years old.

Options

  • :age the following value formats are accepted:
    • from..to a date of birth for someone with an age between from and to. (inclusive)
    • integer a date of birth for someone with the given age.
  • :from
  • :to
@spec timestamp(Keyword.t()) :: UTCDateTime.t() | DateTime.t() | NaiveDateTime.t()

Generate a random timestamp.

Link to this function

timestamp(settings, key, opts \\ [])

View Source
@spec timestamp(Keyword.t(), atom(), Keyword.t()) ::
  UTCDateTime.t() | DateTime.t() | NaiveDateTime.t()

Generate a random timestamp.