In the Book of Bereshit it says that during the flood the waters prevailed 150 days, and in other place it says five months which are the 150 days, from these verses some people prove that the Hebrew calendar the old ancient calendar was a solar calendar because the months had 30 days and at the end of the year they would add 5 days to make it 365. In the modern Hebrew calendar we have either 29 or 30 days, so how can we solve this matter from the book of Bereshit which says that the waters prevailed 5 months which are 150 days, is there a midrash that explains this. .
It is not uncommon in scripture to find "rounding off", that is five months means around 5 months and not exactly 5 months. More to the point, Rashi says that the total time from the beginning of the flood antil the land dried out was 365 days, in conformance with the solar calendar. OTOH Rashi shows how the dates in recording the various stages of the flood were lunar dates, clearly indicating that both systems are in use.