Article 37 [source]

Spanish Criminal Code
English translation

1. House arrest will last up to six months. Compliance with this order requires the convicted person to remain at their home or in a specific location designated by the Judge in the sentence or subsequently in a reasoned order.

However, in cases where house arrest is the primary penalty, taking into account repeated offenses and provided that the applicable provision expressly so stipulates, the Judge may order in the sentence that the house arrest be served on Saturdays, Sundays, and public holidays at the penitentiary closest to the convicted person's home.

2. If the offender requests it and circumstances warrant it, after hearing the public prosecutor, the sentencing judge or court may order that the sentence be served on Saturdays and Sundays or on a non-continuous basis.

3. If the convicted person fails to comply with the sentence, the sentencing judge or court shall take note of the matter in order to proceed in accordance with the provisions of Article 468.

4. To guarantee effective compliance, the Judge or Court may order the use of mechanical or electronic means that allow the location of the offender.