Easy Dates

Date Difference

Receives two calendar dates as one comma-separated ISO 8601 (YYYY-MM-DD) string and returns the number of whole days between them. It converts each date to its UTC epoch-millisecond instant, then takes the rounded absolute difference divided by the milliseconds in a day. Returns that count as a single non-negative integer, regardless of which date comes first.

Visualization

Input

Algorithm code

Custom input

Saved inputs

References