How do they determine csection date?

H • •🌈💙12/18, 💙11/19, 🌈💗11/21, 💙5/23•💍03/13•

STM, with placenta previa this go round, I have to have a c section or it’s likely to kill me and the baby. Still worrisome as both ways severe bleeding is going to occur. Just curious how they determine a date ? How far along, etc. Thank you ☺️