Skip to content

toLocaleDateString doesn't work in V8 when we override Date #1

@pwmarcz

Description

@pwmarcz
> Date = TimeShift.Date
> new TimeShift.Date().toLocaleDateString()
TypeError: Method invoked on an object that is not Date.
> new TimeShift.OriginalDate().toLocaleDateString()
TypeError: Method invoked on an object that is not Date.

It looks like V8 code checks if date instanceof Date (see overrides.js) which fails when Date has been changed.

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