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-10/

{
  "context": "Assesses how well the solution uses temporal-polyfill's Temporal.Now APIs to sample the current moment for a caller-provided IANA time zone. Focuses on honoring deterministic overrides and rejecting bad inputs while still relying on the package's clock helpers.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Zone Now call",
      "description": "Uses `Temporal.Now.zonedDateTimeISO(timeZoneId)` to obtain the zone-aware current moment rather than relying on the system default zone or manual offset math, passing through the caller's timeZoneId.",
      "max_score": 25
    },
    {
      "name": "Instant factory",
      "description": "Captures the absolute instant via `Temporal.Now.instant()` or by calling `.toInstant()` on the zoned now sample, avoiding Date.now or custom conversions, and stringifies the Temporal.Instant result.",
      "max_score": 20
    },
    {
      "name": "Plain date/time",
      "description": "Obtains the date and time components with `Temporal.Now.plainDateISO(timeZoneId)` and `Temporal.Now.plainTimeISO(timeZoneId)` (or by splitting `Temporal.Now.plainDateTimeISO(timeZoneId)`), instead of deriving them from legacy Date objects.",
      "max_score": 20
    },
    {
      "name": "Time zone propagation",
      "description": "Propagates the provided IANA timeZoneId consistently into all Temporal.Now calls so offsets and bracketed zone identifiers match the input rather than the host environment's default zone.",
      "max_score": 15
    },
    {
      "name": "Override priority",
      "description": "Honors provided override functions before calling Temporal.Now APIs and normalizes override returns (Temporal objects or ISO strings) via `.toString()`/`.toJSON()` to produce the four required strings.",
      "max_score": 10
    },
    {
      "name": "Zone validation",
      "description": "Validates the timeZoneId up front using `Temporal.TimeZone.from(timeZoneId)` or the equivalent Temporal.Now argument checks so invalid identifiers throw immediately instead of falling back to a default zone.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-temporal-polyfill

tile.json