Code RoomDate range with timezone handling
MediumPrep Room Coding #4354

Date range with timezone handling

Vibe & agenticAlgorithms & data structuresMid–Senior~18 min

You need a date-range picker utility in TypeScript that, given a start and end date plus a user timezone, returns the inclusive list of calendar days and validates the range. You'll have an AI agent build the date math (not the UI). Write the prompt/spec — constraints, edge cases, acceptance criteria — for a first-try-correct result. What does a vague prompt ("give me the days between two dates") get wrong with dates specifically?

Implement
inclusive_calendar_days(start_date: str, end_date: str, max_span_days: int) → list[str]
Examples
in["2026-03-08","2026-03-10",31]out["2026-03-08","2026-03-09","2026-03-10"]
in["2026-03-10","2026-03-10",31]out["2026-03-10"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 18 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.