Merge pull request #13985 from saurabh6790/leave_period_fix

add get leave period method