Big question

I am with someone who is not legally divorced yet but it should be finished withing 3 weeks, we are pregnant. Will we still be able to put his last name on the baby. Since his divorce will be over before it's born. Due late December.