Skip to content

runtime: Calling toLocaleString on a number returns a date/time. #3917

Description

@paulo-assoc

What happened

Calling toLocaleString on a number returns a formatted date/time string.

What you expected

I expected a formatted number to be returned.

Minimal reproduction

const num: number = 20;
console.log(num.toLocaleString('en-US'))

This logs "12/31/1969, 4:00:00 PM" instead of "20"

Command you ran:

perry compile .\src\index.ts
./index

Environment

  • Perry version: perry 0.5.1025
  • Host OS: Windows 11
  • Target: native

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed defect or regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions