mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-25 22:55:55 -05:00
link to JS equality rules
This commit is contained in:
parent
93792fcc57
commit
3c1171e405
@ -152,10 +152,12 @@ const combine = (dayMillis: number, time: Date | null) => {
|
|||||||
*
|
*
|
||||||
* These are stored in a funny format: number of milliseconds since epoch of
|
* These are stored in a funny format: number of milliseconds since epoch of
|
||||||
* the start of the given day in the browser's time zone. This is because
|
* the start of the given day in the browser's time zone. This is because
|
||||||
* (a) Date objects are always in the local time zone and date-fn rolls with
|
*
|
||||||
* that, and (b) Date objects don't work well in a set. Javascript's
|
* 1. `Date` objects are always in the browser's time zone and `date-fn` rolls
|
||||||
* "same-value-zero algorithm" means that two different Date objects never
|
* with that, and
|
||||||
* compare the same.
|
* 2. `Date` objects don't work well in a `Set`. ECMAScript's [equality
|
||||||
|
* rules](https://262.ecma-international.org/7.0/#sec-abstract-equality-comparison)
|
||||||
|
* mean that two different `Date` objects never compare the same.
|
||||||
*/
|
*/
|
||||||
type AllowedDays = {
|
type AllowedDays = {
|
||||||
minMillis: number;
|
minMillis: number;
|
||||||
|
Loading…
Reference in New Issue
Block a user