In case we are comparing with the current time, the second argument could be omitted.
It seems to work as expected, but it doesn't seem obvious from the docs.
It also causes a type error because the second argument is required.
Most likely, in functions other than is* you can follow the same way and not write new Date() in case the operation is performed with the current time.
In case we are comparing with the current time, the second argument could be omitted.
It seems to work as expected, but it doesn't seem obvious from the docs.
It also causes a type error because the second argument is required.
Most likely, in functions other than
is*you can follow the same way and not writenew Date()in case the operation is performed with the current time.