You are given two date strings representing two calendar days in the format "YYYY-MM-DD".
Your task is to determine how many days lie between these two dates.
The order of the two dates does not matter — the result should always be the absolute difference in days.
Input: date1 = "2021-03-01", date2 = "2021-03-10"
Output: 9
Explanation:
There are exactly 9 days from March 1st to March 10th.
Input: date1 = "2022-12-25", date2 = "2023-01-01"
Output: 7
Explanation:
Seven days separate these two dates.
Accepted:
Submission: