The maximum duration of an academic exchange is two consecutive semesters, usually in the same academic year. However, academic calendars differ significantly from one region of the world to another, and from one country to another, even in Europe. In Switzerland, the academic calendar consists of the first semester which runs from August to January and the second semester, from February to July. On the other hand, in the southern hemisphere for example, the academic calendar is based on the calendar year and starts in January. There are many other variations such as in Germany where the first semester starts in October and ends in March and the second runs from April to September. It is thus your responsibility to get information from your host university about the dates of the academic calendar. These are generally available on the official websites of the universities.
Because of the differences in academic calendars between countries, it could happen that if you are leaving for the spring semester according to the UNIL calendar, you may need to leave already in January. Therefore, you should make arrangements with the heads of your faculty, section or school in order not to have to take your exams in January. There are indeed various solutions that will allow you to complete your mobility as smoothly as possible, such as moving your exams to the August session, for example.
An exchange program can be from one to two semesters long. However, some countries (Canada, for example) split their academic year into three terms, it is therefore important to communicate with the host university to define exactly when you plan to study there. Your mobility advisor will be happy to provide you with more detailed information on this point.