Solution (source code)

= Solution

For period survival analysis over a calendar window, patients diagnosed earlier enter at the window's start only if still alive. Their survival times are left-truncated at the elapsed duration from diagnosis to that date, while follow-up is censored at the window's end. This estimates survival using mortality experience in the chosen recent period without pretending that earlier survivors were under observation from diagnosis.