Prompt / exact input

temp 0.7max 32768 tokensfirst response only
Build a date-calculation demo as one complete HTML file with inline CSS and vanilla JavaScript. No libraries, CDNs, external resources, network requests, storage, or embedded frames. It must work inside an iframe sandboxed with allow-scripts only. Return only the HTML file.

Compute all seven results below in JavaScript at page load. Do not hard-code the answers as literal strings in the markup; the displayed values must come from your own date logic. Treat all dates as calendar dates in Europe/Berlin, and make sure no UTC conversion shifts a result by a day.

Show each case as a labelled row. The computed value must be rendered in its own element carrying the exact attribute shown, containing only the answer text:
- data-answer="case-1": whole days from 2026-03-01 to 2026-03-31. Note that clocks go forward on 2026-03-29; this must not change the count.
- data-answer="case-2": 2026-01-31 plus one month, clamped to the last valid day, formatted YYYY-MM-DD.
- data-answer="case-3": number of weekdays from 2026-09-07 to 2026-09-18, counting both endpoints.
- data-answer="case-4": ISO week of 2026-01-01, formatted like 2026-W01.
- data-answer="case-5": 2026-02-28 plus one day, formatted YYYY-MM-DD. 2026 is not a leap year.
- data-answer="case-6": whole days from 2026-10-24 to 2026-10-26. Clocks go back on 2026-10-25; this must not change the count.
- data-answer="case-7": the English weekday name of 2026-09-05.

Also provide two date inputs with ids start-date and end-date, defaulting to 2026-09-07 and 2026-09-18, and show the whole days between them in an element with data-answer="custom", updating live as either input changes and handling a reversed range without producing a negative or NaN result. Give every input a visible associated label.

Show your working: under each case, briefly state the rule you applied. Keep the layout compact and readable on a narrow screen, with the results visible near the top of the page.

Pick your favorite

Model names stay hidden until you pick. Choose the output you like best, then see which model made it.

Model

Hidden

Model

Hidden

Model

Hidden

Model

Hidden

Model

Hidden

Model

Hidden