Lorem Ipsum Utilities

Generate Dates

Generate random dates for testing, prototypes, and mock data. Access via MCP in Cursor or Windsurf, or call GET /v1/lorem/dates directly. Returns deterministic date ranges in various formats — perfect when Claude needs realistic sample data instead of today's date repeated. Supports custom ranges, formats, and quantities.

API Endpoint

GET /v1/lorem/dates

Code Examples

curl "https://tinyfn.io/v1/lorem/dates" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/lorem/dates', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/lorem/dates',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's lorem ipsum tools:

{
  "mcpServers": {
    "tinyfn-lorem": {
      "url": "https://tinyfn.io/mcp/lorem",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I generate random dates with specific year ranges?

Pass start_year and end_year parameters to /v1/lorem/dates. For example, start_year=2020&end_year=2024 generates dates only within that range.

What date formats does the random date generator support?

Returns ISO 8601 format (YYYY-MM-DD) by default. Additional formats like MM/DD/YYYY, DD-MM-YYYY, and Unix timestamps available via format parameter.

Can MCP agents generate multiple random dates at once?

Yes, specify the count parameter to generate arrays of random dates. Useful when your AI agent needs to populate tables or generate test datasets with varied timestamps.

Do generated dates include weekends and holidays?

By default, yes — all calendar dates are possible. Use business_days_only=true parameter to exclude weekends, creating more realistic corporate data scenarios.

How is this different from just using new Date() in code?

Provides deterministic, configurable randomness across date ranges with consistent seeding. Better than Math.random() for reproducible test data and mock scenarios.

Try Generate Dates Now

Get your free API key and start using Generate Dates in seconds.

Get Free API Key