Hadithcore
Hadith #2113550

Narrated Ibn 'Abbas (RA):

The swearing to stay away from one's wife in al-Jahiliyyah era was for one or two years. Then, Allah appointed a period of four months for it. So, if it is less than four months, it is not swearing to stay away from one's wife. [al-Baihaqi reported it]

وَعَنِ اِبْنِ عَبَّاسٍ رَضِيَ اَللَّهُ عَنْهُمَا قَالَ: { كَانَ إِيلَاءُ اَلْجَاهِلِيَّةِ اَلسَّنَةَ وَالسَّنَتَيْنِ, فَوَقَّتَ اَللَّهُ أَرْبَعَةَ أَشْهُرٍ, فَإِنْ كَانَ أَقَلَّ مِنْ أَرْبَعَةِ أَشْهُرٍ, فَلَيْسَ بِإِيلَاءٍ } أَخْرَجَهُ اَلْبَيْهَقِيُّ .‏ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 8, Hadith 147
Arabic/English book reference
Book 8, Hadith 1102