Skip to content

Dates should coerce to strings not numbers when the plus operator is used #283

@NeilFraser

Description

@NeilFraser

JavaScript coerces a Date to a string:

(new Date()) + 60000
"Wed Dec 18 2024 00:19:11 GMT+0100 (Central European Standard Time)60000"

JS-Interpreter coerces a Date to a number:

(new Date()) + 60000
1734477491561

I like JS-Interpreter's behaviour better, but what I like or don't like doesn't matter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions