Days Between Dates

Calculates the number of days between two dates.

GET /calc/days

Parameters

Parameter
Required
Description

from

Yes

Start date in YYYY-MM-DD format

to

Yes

End date in YYYY-MM-DD format

Example

curl "https://api.uwuapps.org/calc/days?from=2025-01-01&to=2025-12-31"

Response

{
  "success": true,
  "from": "2025-01-01",
  "to": "2025-12-31",
  "days": 364
}

Notes

  • The result is always a positive number regardless of which date is earlier.

  • Both dates must be valid ISO date strings.

Errors

Error
Cause

Invalid "from" date.

from is not a valid date

Invalid "to" date.

to is not a valid date

Last updated

Was this helpful?