Added function to calculate current term of trainee