Tag and build

This commit is contained in:
Angelos Chalaris
2017-12-14 20:26:20 +02:00
parent 5803b7b24b
commit e088653e3e
2 changed files with 16 additions and 0 deletions

View File

@ -49,6 +49,9 @@
* [Redirect to URL](#redirect-to-url)
* [Scroll to top](#scroll-to-top)
### Date
* [Get days difference between dates](#get-days-difference-between-dates)
### Function
* [Chain asynchronous functions](#chain-asynchronous-functions)
* [Curry](#curry)
@ -557,6 +560,18 @@ const scrollToTop = _ => {
// scrollToTop()
```
[⬆ back to top](#table-of-contents)
## Date
### Get days difference between dates
Calculate the difference (in days) between to `Date` objects.
```js
const getDaysDiffBetweenDates = (dateInitial, dateFinal) => (dateFinal - dateInitial) / (1000 * 3600 * 24);
//getDaysDiffBetweenDates(new Date("2017-12-13"), new Date("2017-12-22")) -> 9
```
[⬆ back to top](#table-of-contents)
## Function

View File

@ -28,6 +28,7 @@ fill-array:array
filter-out-non-unique-values-in-an-array:array
flatten-array-up-to-depth:array
flatten-array:array
get-days-difference-between-dates:date
get-max-value-from-array:array
get-min-value-from-array:array
get-native-type-of-value:utility