Need to reduced leave from leave policy

Hi,

I need to minus leave allocation when user assign leave policy start from date of joining.
if user join at mid of year, leave allocation in leave policy should be half to user.