you were enrolled as a full-time student at an eligible educational institution (defined earlier), or took a full-time,on-farm training course given by such an institution or by a state, county, or local government agency."
The 5 calendar months don’t have to be consecutive.
Full-time student.
A full-time student is a student who
is enrolled for the number of hours or courses the school considers to
be full-time
attendance.
School defined.
A school can be an elementary school,
junior or senior high school, college, university, or technical, trade,
or mechanical
school. However, an on-the-job training
course, correspondence school, or school offering courses only through
the Internet
doesn’t count as a school.