Skip to content

Optional argument in is* functions #56

@Serator

Description

@Serator

In case we are comparing with the current time, the second argument could be omitted.

image

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.

image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions