Skip to content

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

Closed

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

Activity

  1. added a commit that references this issue on Jun 1, 2026
  2. changed the title [-]Calling toLocaleString on a number returns a date/time.[/-] [+]runtime: Calling toLocaleString on a number returns a date/time.[/+] on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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