The Prophet ﷺ said, "We are an unlettered nation. We neither write nor calculate. The month is like this and like this," meaning sometimes twenty-nine days and sometimes thirty.
عن النبي أنه قال: إنا أمة أمية لا نكتب ولا نحسب، الشهر هكذا وهكذا. يعني مرة تسعة وعشرين، ومرة ثلاثين.
Bukhari narrated it in the Book of Fasting (1913) and Muslim in the Book of Fasting (15:1080), both via Shubah, who said, Aswad bin Qays narrated to us, saying, Saeed bin Amr bin Saeed narrated to us, that he heard Ibn Umar narrating it, and he mentioned it. The wording given is that of Bukhari, while Muslim's wording is similar.