* @summary Are the given dates in the same second (and hour and day)?
5
*
6
* @description
7
* Are the given dates in the same second (and hour and day)?
8
*
9
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
10
*
11
* @param dateLeft - The first date to check
12
* @param dateRight - The second date to check
13
*
14
* @returns The dates are in the same second (and hour and day)
15
*
16
* @example
17
* // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 in the same second?
18
* const result = isSameSecond(
19
* new Date(2014, 8, 4, 6, 30, 15),
20
* new Date(2014, 8, 4, 6, 30, 15, 500)
21
* )
22
* //=> true
23
*
24
* @example
25
* // Are 4 September 2014 06:00:15.000 and 4 September 2014 06:01.15.000 in the same second?
26
* const result = isSameSecond(
27
* new Date(2014, 8, 4, 6, 0, 15),
28
* new Date(2014, 8, 4, 6, 1, 15)
29
* )
30
* //=> false
31
*
32
* @example
33
* // Are 4 September 2014 06:00:15.000 and 5 September 2014 06:00.15.000 in the same second?