Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:31:14

And We have enjoined upon man ˹care˺ for his parents. His mother carried him, ˹increasing her˺ in weakness upon weakness, and his weaning is in two years. Be grateful to Me and to your parents; to Me is the ˹final˺ destination.  

And We have enjoined man concerning his parents, We commanded him to be dutiful towards them — his mother bears him, and weakens, in weakness after weakness, that is to say, she is weakened by the pregnancy, the pains of labour and the delivery; and his weaning is in two years, and We said to him ˹to man˺: ‘Give thanks to Me and to your parents. To Me is the journey’s end, the return.
القرآن:٣١:١٤

وَوَصَّيْنَا الْإِنْسَانَ بِوَالِدَيْهِ حَمَلَتْهُ أُمُّهُ وَهْنًا عَلَىٰ وَهْنٍ وَفِصَالُهُ فِي عَامَيْنِ أَنِ اشْكُرْ لِي وَلِوَالِدَيْكَ إِلَيَّ الْمَصِيرُ  

{ووصينا الإنسان بوالديه} أمرناه أن يبرهما {حملته أمُه} فْوهنت {وهنا على وهنٍ} أي ضعفت للحمل وضعفت للطلق وضعفت للولادة {وفصاله} أي فطامه {في عامين} وقلنا له {أنِ اشكر لي ولوالديك إلىَّ المصير} أي المرجع.