Update getDaysDiffBetweenDates.md
This commit is contained in:
committed by
GitHub
parent
b3dba59f01
commit
c575e9b23b
@ -5,7 +5,7 @@ tags: date,intermediate
|
|||||||
|
|
||||||
Calculates the difference (in days) between two dates.
|
Calculates the difference (in days) between two dates.
|
||||||
|
|
||||||
- Subtract the two `Date` object and divide by the number of milliseconds in a day to get the difference (in days) between them.
|
- Subtract the two `Date` objects and divide by the number of milliseconds in a day to get the difference (in days) between them.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const getDaysDiffBetweenDates = (dateInitial, dateFinal) =>
|
const getDaysDiffBetweenDates = (dateInitial, dateFinal) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user