Parisian ruin over a finite-time horizon