Info from the Seguridad Social in English HERE
If the link doesn´t lead you to the required info, as the Seguridad Social website changes continually, please look for the info in the following sections – subsection.
You are in: Home » Workers » Benefits / Pensions for Workers » Retirement » General Regime » Ordinary Retirement » Requirements
As I understand it, to determine the required minimum contribution years, you need to add the years in full time employment, and the years/months in part time employment, calculating with an equal percentage in time, as you worked. So say you worked 2 years for 20 hours/week, this would count as 2 years at 50%, so one full year.
Then, you need to take the total amount of time you were employed, and divide that by the days that were the result of the above calculation. This will be the percentage that you have to apply to the minimum of 15 years (for full time employment), bringing it down more or less, depending on how long you worked part time and the amount of hours you worked.
This is not an easy calculation and I would strongly recommend visiting the INSS so they can do this for you and explain.
Update July 2019: A ruling from the Supreme Court has declared this calculation method to be inconstitutional, every day worked and thus contributed, should count towards your entitlement, irrespective of the amount of hours worked on a day. As not doing so, would amount to a double penalization, as those working part time in most cases will have less income, so less entitlement in the first place. And also, as the majority of part timers are women, it could be considered indirect gender discrimination. The INSS has updated their calculation method in record time, and any new pension applications where part time work is part of the work history, will be calculated taking the above into account. Moreover, around 8.500 applications ‘already recognized and with no firm resolution’ will be revaluated, amounting in a 4% pension increase for about 2.200 of them.