Allow course access for users depending on their enrollment date

I have a course running for 5 years, and every year a bunch of students enroll to it. This course contains videos, text, assignments and case studies to be submitted.
How do I set a duration of 1 year for each student, depending on their enrollment date?