relative_time
TemporalGenerate relative time strings like '3 hours ago', '2 days ago', 'just now'. The format used in social feeds, notifications, and activity logs.
Example Outputs
3 hours ago2 days agojust now5 minutes ago1 week agoAPI Usage
Send a POST request to generate relative time data:
curl -X POST https://mockhero.dev/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tables": [
{
"name": "example",
"count": 5,
"fields": [
{
"name": "relative_time",
"type": "relative_time"
}
]
}
]
}'Common Use Cases
- Social feed testing
- Activity log seeding
- Notification display
- Comment timestamps
Quick Info
- Field Type
- relative_time
- Category
- Temporal
- Parameters
- None required
- Output Format
- JSON, CSV, SQL
Generate Relative Time + 155 more types via API
One API call. Multiple tables. Relational integrity. Free tier included.