It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "When the crescent disappears from sight before the twilight has set, it belongs to the first night; and if it sets after the twilight, it is counted as belonging to the second night."
Imam Abu Ya'la recorded it; however, its chain is technically da'if (weak) because of the tadlis of Baqiyyah bin al-Walid.