Please tell me when this law is pass from spanish government

Citizenship by Choice:

Those whose determination of parentage (determination of parentage means establishing who the parents of a person are) or birth in Spain occurs after eighteen years of age. In this case, the deadline to apply for citizenship is two years since the birth or descent is determined.

I lost spanish nationality.now i want to recover it.Please help me.