Interview question of the issue #337 of rendezvous with cassidoo.
Write a function called daysBetween
that takes in two dates, and returns the number of days between those dates. You can choose the date format you'd like to accept!
Example:
> daysBetween('Jan 1, 2024', 'Jan 29, 2024')
> 28
> daysBetween('Feb 29, 2020', 'Oct 31, 2023')
> 1340
Just pnpm i
to install all dependencies and then pnpm t
to run the tests!