Whoever repents before the sun rises from the west, Allah will accept his repentance. [Muslim]
«مَنْ تَابَ قَبْلَ أَنْ تَطْلُعَ الشَّمْسُ مِنْ مَغْرِبِهَا تَابَ اللهُ عَلَيْهِ» (مسلم)