A lightweight polyfill for Temporal, successor to the JavaScript Date object
Overall
score
96%
Evaluation — 96%
↑ 1.19xAgent success when using this tile
Transforms recurring and partial date inputs into full target-calendar dates while preserving calendar semantics. All conversions use the provided target calendar unless a swap entry supplies its own override. Output collections preserve the ordering of the corresponding inputs, and date strings include a calendar annotation whenever the calendar is not the ISO default.
2024-02-29[u-ca=gregory]. @test2025-03-10[u-ca=gregory]. @test2025-03-01[u-ca=japanese]. @test@generates
type MonthDayInput = {
month: number;
day: number;
calendar: string;
label?: string;
};
type YearMonthInput = {
year: number;
month: number;
day: number;
calendar: string;
label?: string;
};
type FullDateInput = {
date: string; // YYYY-MM-DD
calendar: string;
label?: string;
};
type CalendarPlan = {
monthDays: Array<{ label?: string; date: string; calendar: string }>;
yearMonths: Array<{ label?: string; date: string; calendar: string }>;
convertedDates: Array<{ label?: string; date: string; calendar: string }>;
};
export function buildCalendarPlan(options: {
targetCalendar: string;
anchorYear: number;
monthDays: MonthDayInput[];
yearMonths: YearMonthInput[];
swapDates: Array<
FullDateInput & { targetCalendar?: string } // defaults to options.targetCalendar when omitted
>;
}): CalendarPlan;Calendar-aware date/time transformations.
Install with Tessl CLI
npx tessl i tessl/npm-temporal-polyfilldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10