CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-temporal-polyfill

A lightweight polyfill for Temporal, successor to the JavaScript Date object

Overall
score

96%

Evaluation96%

1.19x

Agent success when using this tile

Overview
Eval results
Files

rubric.jsonevals/scenario-8/

{
  "context": "Evaluates how well the solution applies temporal-polyfill to build target-calendar dates from partial inputs and to swap calendars while preserving absolute days. Scoring looks only at correct Temporal API usage for the behaviors described in the spec, not general code structure.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "MonthDay conversion",
      "description": "Uses Temporal.PlainMonthDay.from(...) with toPlainDate({ year: anchorYear }) and then withCalendar(targetCalendar) (or per-entry override) to produce month/day results in the target calendar, keeping input order.",
      "max_score": 25
    },
    {
      "name": "Leap rejection",
      "description": "Detects invalid anchor years for month/day pairs such as 02-29 by relying on Temporal.PlainMonthDay.toPlainDate throwing (or equivalent guard) and surfaces a clear error instead of emitting a date.",
      "max_score": 15
    },
    {
      "name": "YearMonth completion",
      "description": "Completes year/month inputs with Temporal.PlainYearMonth.from(...).toPlainDate({ day }) and applies withCalendar(targetCalendar) to yield target-calendar strings.",
      "max_score": 20
    },
    {
      "name": "Calendar swapping",
      "description": "Converts full dates with Temporal.PlainDate.from(...) and applies withCalendar(entryTargetCalendar || targetCalendar) to preserve the same absolute day while changing calendar identity.",
      "max_score": 20
    },
    {
      "name": "Calendar annotation output",
      "description": "Formats results via Temporal toString()/toJSON or equivalent so non-ISO calendars include the [u-ca=...] annotation (e.g., gregory/japanese) while ISO outputs omit it.",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-temporal-polyfill

tile.json