Date & Time

Date Difference API

Break down the gap between two dates into years, months, days, and totals in days and hours.

Request Headers

Name Required Description
X-RapidAPI-Key required Your RapidAPI key. Get one free.
X-RapidAPI-Host required date-diff.p.rapidapi.com

Endpoints

GET /v1/time/diff

Compute the calendar and total difference between two dates

Parameters

NameTypeRequiredDefaultConstraints
endstringrequired—matches \S
startstringrequired—matches \S

Code Examples

curl --request GET \
  --url 'https://date-diff.p.rapidapi.com/v1/time/diff?end=example&start=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: date-diff.p.rapidapi.com'

Interactive Example

date-diff
$ GET /v1/time/diff?start=2020-01-01&end=2023-03-15
{"years":3,"months":2,"days":14,"total_days":1169,"total_hours":28056}

Subscribe & License

Access this API with commercial-ready tiers on RapidAPI. Flexible plans designed for side-projects, startups, and high-volume production architectures.

View Pricing & Subscribe

Developer Support

Need help integrating or have a custom endpoint request? Our engineering team is here to assist with authentication, payload schemas, and high-frequency rate limit increases.

Contact API Engineering

System Performance

Monitored 24/7 with a 99.9% uptime SLA. Built atop cloud-native microservices with globally distributed edge caching to ensure ultra-low latency response times.

All Systems Operational