Miscarriage

I’m not sure which day My babies heart stopped beating but I had a d&c.; So when would I consider having miscarried? The day his/her heart stopped beating or the day of my surgery?