#C13456. Days Between Dates
Days Between Dates
Days Between Dates
Given two dates in the format \(yyyy\text{-}mm\text{-}dd\), compute the absolute difference in days between them.
Your task is to read two dates from the standard input, calculate the number of days between the two dates (regardless of the order), and output the result to the standard output.
Note that the date format follows the ISO standard \(yyyy\text{-}mm\text{-}dd\). For example, the difference between 2023-01-01 and 2023-01-02 is 1 day, while the difference between 2020-02-28 and 2020-03-01 is 2 days (taking into account the leap year).
inputFormat
The input consists of two lines. The first line contains the first date, and the second line contains the second date. Both dates are in the format \(yyyy\text{-}mm\text{-}dd\).
outputFormat
Output a single integer which is the absolute number of days between the two dates.
## sample2023-01-01
2023-01-01
0