I was fasting today and I got my period one or two hours before Maghrib. Does my fast break? Do I have redo it?

If your fast was a wajib fast then you will have to redo it once your periods are over and you've done your ghusl