Calculate leave duration based on leave type