The extended periodic Lyapunov lemma