LRS.org API Documentation

Random Date Generator

About

This API (which powers the popular tool at www.lrs.org/interactive/randomdate.php) returns random dates based on a variety of user specified parameters such as year, number of dates, etc.

URL

Send a GET request to https://api.lrs.org/random-date-generator.

Parameters

Description Field Value
Year year 1970 - 2038
Number of dates num_dates 1 - 365
Days of the week to exclude exclude[] Sunday = 7
Monday = 1
Tuesday = 2
Wednesday = 3
Thursday = 4
Friday = 5
Saturday = 6
Maximum number of results for each:
Day of the week lim_days 1 - 7
Month lim_months 1 - 12
Quarter lim_quarters 1 - 4

NOTE: because of the variety of limits that may be specified, the tool will not always be able to return the specified number of dates. For example, if you limit results to a maximum of 1 date per day of the week, the tool can obviously only return 7 dates.

Results

Results are returned in JSON format. Click the links for examples.

Demo

View Demo