I am a young woman, twenty years old. I got pre-menstrual pains during Ramadan before Zuhr prayer; it was so bad that I could not stand up to pray, and even when I was sitting I could not pray. But I did not get my period until five minutes before the adhaan for Maghrib. Please note that I continued fasting throughout the day. Is it permissible for me to make up this day or am I regarded as having fasted it?.
If the period began and blood appeared before the sun set, you should regard yourself as having broken the fast, and you have to make up this day. But the pains that appeared before that do not invalidate the fast. Pain due to the fact that menstruation is close at hand does not invalidate the fast. So if the pain continued but there was no bleeding until the sun set, then the fast is valid and you do not have to make up this day.
But if bleeding starts before the sun sets, even if it is only five minutes before, then this fast is invalidated and you have to make it up. This is the shar‘i ruling as far as we know. With regard to the pains, there are medicines and treatments for that; you should ask doctors, and perhaps you will find with them that will relieve you of this pain you are feeling.
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allah have mercy on him)