4019.
(a) The provisions of this section shall apply in all of the following cases:(1) When a prisoner is confined in or committed to a county jail, industrial farm, or road camp, or any city jail, industrial farm, or road camp, including all days of custody from the date of arrest to the date on which the serving of the sentence commences, under a judgment of imprisonment, or a fine and imprisonment until the fine is paid in a criminal action or proceeding.
(2) When a prisoner is confined in or committed to the county jail, industrial farm, or road camp or any city jail, industrial farm, or road camp as a condition of probation after suspension of imposition of a sentence or suspension of execution of sentence, in a criminal action or proceeding.
(3) When a prisoner is confined in or
committed to the county jail, industrial farm, or road camp or any city jail, industrial farm, or road camp for a definite period of time for contempt pursuant to a proceeding, other than a criminal action or proceeding.
(4) When a prisoner is confined in a county jail, industrial farm, or road camp, or a city jail, industrial farm, or road camp following arrest and prior to the imposition of sentence for a felony conviction.
(b) Subject to the provisions of subdivision (d), for each six-day period in which a prisoner is confined in or committed to a facility as specified in this section, one day shall be deducted from his or her period of confinement unless it appears by the record that the prisoner has refused to satisfactorily perform labor as assigned by the sheriff, chief of police, or superintendent of an industrial farm or road camp.
(c) For each six-day period in which a prisoner is confined in or committed to a facility as specified in this section, one day shall be deducted from his or her period of confinement unless it appears by the record that the prisoner has not satisfactorily complied with the reasonable rules and regulations established by the sheriff, chief of police, or superintendent of an industrial farm or road camp.
(d) Nothing in this section shall be construed to require the sheriff, chief of police, or superintendent of an industrial farm or road camp to assign labor to a prisoner if it appears from the record that the prisoner has refused to satisfactorily perform labor as assigned or that the prisoner has not satisfactorily complied with the reasonable rules and regulations of the sheriff, chief of police, or superintendent of any industrial farm or road camp.
(e) No deduction may be made under this section unless the person is committed for a period of six days or longer.
(f) It is the intent of the Legislature that if all days are earned under this section, a term of six days will be deemed to have been served for every
four days spent in actual custody.
(g) The changes in this section as enacted by the act that added this subdivision shall apply to prisoners who are confined to a county jail, city jail, industrial farm, or road camp for a crime committed on or after the effective date of that act.