#39 - Number of days between two dates

You are given two dates in the format "YYYY-MM-DD". Your task is to implement a function to calculate the number of days between these two dates, inclusive of the end date.

Example 1

date1 = "2024-01-01"
date2 = "2024-01-10"
10

Example 2

date1 = "2024-01-10"
date2 = "2024-01-01"
10

Example 3

date1 = "2024-01-01"
date2 = "2025-01-01"
367

Last updated