Skip to main content

unixTime

Generate an unix time between zero, and the given value. By default, now is used as input. Optionally, a parameter can be supplied containing a DateTime, int or string.

dateTime

Generate a DateTime between January 1, 1970, and the given max. By default, now is used as max. Optionally, a parameter can be supplied containing a DateTime, int or string. An optional second parameter can be supplied, with the timezone.

dateTimeAD

Generate a DateTime between January 1, 0001, and the given max. By default, now is used as max. An optional second parameter can be supplied, with the timezone.

iso8601

Generate an ISO8601 formatted string between January 1, 0001, and the given max. By default, now is used as max.

date

Generate a date string, with a given format and max value. By default, 'Y-m-d' and 'now' are used for the format and maximum value respectively.

time

Generate a time string, with a given format and max value. By default, H:i:s' and now are used for the format and maximum value respectively.

dateTimeBetween

Generate a DateTime between two dates. By default, -30 years and now are used. An optional third parameter can be supplied, with the timezone.

dateTimeInInterval

Generate a DateTime between a date and an interval from that date. By default, the date is set to -30 years, and the interval is set to +5 days. An optional third parameter can be supplied, with the timezone.

dateTimeThisCentury

Generate a DateTime that is within the current century. An optional $max value can be supplied, by default this is set to now. An optional second parameter can be supplied, with the timezone.

dateTimeThisDecade

Generate a DateTime that is within the current decade. An optional $max value can be supplied, by default this is set to now. An optional second parameter can be supplied, with the timezone.

dateTimeThisYear

Generate a DateTime that is within the current year. An optional max value can be supplied, by default this is set to now. An optional second parameter can be supplied, with the timezone.

dateTimeThisMonth

Generate a DateTime that is within the current month. An optional max value can be supplied, by default this is set to now. An optional second parameter can be supplied, with the timezone.

amPm

Generate a random DateTime, with a given upper bound, and return the am/pm string value. By default, the upper bound is set to now.

dayOfMonth

Generate a random DateTime, with a given upper bound, and return the day of month string value. By default, the upper bound is set to now.

dayOfWeek

Generate a random DateTime, with a given upper bound, and return the day of week string value. By default, the upper bound is set to now.

month

Generate a random DateTime, with a given upper bound, and return the month’s number string value. By default, the upper bound is set to now.

monthName

Generate a random DateTime, with a given upper bound, and return the month’s name string value. By default, the upper bound is set to now.

year

Generate a random DateTime, with a given upper bound, and return the year’s string value. By default, the upper bound is set to now.

century

Generate a random century name.

timezone

Generate a random timezone name.