Skip to content

Format negative years in Date string methods #693

@rogeralsing

Description

@rogeralsing

Context: Test262 failures for Date.prototype.toString/toDateString/toUTCString with negative years.

Fixes:

  • Add manual formatting helpers that compute year/month/day/weekday/time from ECMAScript time values and format signed years with at least four digits.
  • Use manual formatters for out-of-range years in toString/toDateString/toUTCString.

Tests:

  • dotnet test tests/Asynkron.JsEngine.Tests.Test262 -c Release --settings tests/Asynkron.JsEngine.Tests.Test262/BuiltInsTests.runsettings --filter "Name=Date_prototype_toDateString|Name=Date_prototype_toString|Name=Date_prototype_toUTCString"

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