Haflagah means the length of the previous cycle. This is calculated as the number of days between the last two periods, starting from the day the first period started, until and including the day the second period started. For example, if a woman got a period on the 1st of Nissan and the next period started on the 29th of Nissan, her haflagah is 29 days. Therefore, her vest haflagah is the 27th of Iyar. If the next period actually started on the 28th of Iyar, her haflagah changes to 30 days and her next vest haflagah is on the 28th of Sivan. When calculating vest haflagah it is easier to simply count the days between the periods, including the day each period started, rather than to pay attention to the calendar dates.
Note that the first day of the woman’s period counts as both the first day of the current haflagah and the last day of the previous haflagah.
The vest haflagah is always on the onah that the most recent period started on. For example, if the most recent period was by day, then the next vest haflagah is by day.
Generally, after each period, one must recalculate the haflagah and the vest haflagah changes. If the first haflagah is 30 days, and the next period is 31 days later, the vest haflagah changes from 30 days to 31 days.