Sayyiduna Mu'awiyah (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings be upon him) say: "Fast this month, and on its last day as well."
Al-Walid said: I heard Abu Amr, meaning al-Awza'i, say: Its sirr is its beginning. Sa'id bin Abdul Aziz also used to say: Its sirr is its beginning. The Shaykh said: Others narrated from al-Awza'i that he said: Its sirr is its end, and that is correct. By it is meant the one or two days in which the moon is hidden before the day of doubt; or it means fasting at the end of the month together with the day of doubt, when that coincides with his habit of fasting at the end of every month. It has also been said that by its sirr is meant its middle, since the sirr of everything is its inside; on this view it means the White Days (ayyam al-bid). And Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 7970