Standalone · runs entirely in your browser

Jetlag Plan Lab

Create plans from example or custom flights, and run repeatable batches against 50 route and persona cases.

Create a plan

Choose a demo route to fill the form, or enter your own itinerary. All times are local to the airport.

Airport autocomplete includes the bundled app airport list. Selecting an airport fills its IANA time zone; you can edit the zone if needed.

Offline test runner

Run the 50-case suite

Cases run in their listed order. Each generated plan includes basic integrity checks; no endpoint, network connection, or API key is used.

Batch progress

50generated cases
50not yet run
0valid plans
0rule warnings
0generation errors

Integrity checks catch malformed timestamps and simple rule conflicts only; they do not prove algorithmic or clinical correctness.

Transparent by design

How this demo generates a plan

This is the standalone demo algorithm, not the production app algorithm. The source below is rendered directly from the function used to generate each plan.

  1. Resolve local flight times. Convert departure and arrival wall-clock times to UTC using the selected airports’ IANA time zones and the browser’s time-zone database.
  2. Estimate the clock shift. Compare the UTC offsets at departure and arrival, then wrap the difference to the shortest signed shift (−12 to +12 hours). Negative is treated as eastward/advance; positive as westward/delay.
  3. Set the adaptation window. Use approximately one recovery day per two hours of shift, with a minimum of one and a maximum of seven days.
  4. Create daily activities. Build an eight-hour sleep opportunity, optional caffeine 90 minutes after waking, daylight after waking, and two hours of reduced bright light before sleep. Add the flight interval on departure day.
  5. Shift sleep timing gradually. On pre-flight and post-arrival dates, shift the target bedtime/wake time toward the destination clock by up to one hour per day eastward or 1.5 hours per day westward, capped at the total clock shift.
  6. Run basic integrity checks. Check that intervals have positive duration, the schedule is no longer than 14 days, and caffeine is not less than eight hours before a planned sleep. Warnings are visible on each result card.

This simplified demo uses a single flight leg, fixed activity durations, and a basic shift model. It does not model connections, live flight schedules, sunrise/sunset, light intensity, medication, or individual medical needs.

Plan-generation source code (JavaScript)

Bring your own algorithm

Custom algorithm lab

Define function makePlan(testCase) that returns a plan with itinerary, algorithmSummary, and a non-empty activities array. Runs locally; results are compared with the built-in algorithm.

Edit your algorithm (JavaScript)

Plan results

Plan reviews are grouped and sorted by the selected travel date, plan name, and plan ID. Use the spreadsheet link to open the associated review sheet.

Open Jetlag review spreadsheet ↗

Spreadsheet rows are not imported into this standalone page; review entries here reflect the locally generated plan checks.