Jami` at-Tirmidhi, Book 8, Hadith 37 (Tirmidhi 718)

Ibn Umar narrated that :

the Prophet said: "Whoever died while he had a month to fast, then a needy person should be fed on his behalf in place of every day."