You can connect with the API by sending a POST request to the following endpoint:
https://do-calculate.com/api/calculate-date-gregorian-differences
Request Body:
The API expects a JSON object in the request body with the following property
Replace YYYY-MM-DD
with the desired date as the below example:
{ "date1": "1990-01-01", "date2": "1995-06-15" }
The API will respond with a JSON object containing the calculated age differences:
{ "differences": { "years": 5, "months": 5, "days": 14, "hours": 0, "minutes": 0, "seconds": 0 } }
The differences object includes the age differences between date1 and date2 in years, months, days, hours, minutes, and seconds.
If the request is invalid or missing the dateOfBirth property, the API will respond with a 400 Bad Request status code.
If the provided dateOfBirth is not a valid date, the API will also respond with a 400 Bad Request status code.
curl -X POST -H "Content-Type: application/json" -d '{"date1":"1990-01-01","date2":"1995-06-15"}' https://do-calculate.com/api/calculate-date-gregorian-differences