It is perfectly legal: employers do NOT need to count for seniority, raises/promotions, benefits accrual, etc. any time that you have the job but are not actually working. So medical/family/etc. leave, vacation days, sick days, paid holidays, etc. do not count for any sort of accrual.