وَعَن سفينة قَالَ: سَمِعْتُ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ: «الْخِلَافَةُ ثَلَاثُونَ سَنَةً ثُمَّ تَكُونُ مُلْكًا» . ثُمَّ يَقُولُ سَفِينَةُ: أَمْسِكْ: خِلَافَةَ أَبِي بَكْرٍ سَنَتَيْنِ وَخِلَافَةَ عُمَرَ عَشْرَةً وَعُثْمَانَ اثْنَتَيْ عَشْرَةَ وَعَلِيٍّ سِتَّةً. رَوَاهُ أَحْمَدُ وَالتِّرْمِذِيُّ وَأَبُو دَاوُدَ
Translation
Safina told that he heard the Prophet say, "The Caliphate will last thirty years, then there will be a kingdom." Then Safina was saying

Calculate Abu Bakr's Caliphate as two years, `Umar's as ten, `Uthman's as twelve, and `Ali's as six. Ahmad, Tirmidhi and Abu Dawud transmitted it.