666.1.
(a) Notwithstanding any other law, a person who has been convicted of a misdemeanor violation of any of the crimes listed in subdivision (b) may be punished either by imprisonment for not more than a year in a county jail or by imprisonment pursuant to subdivision (h) of Section 1170 if the following criteria are met:(1) The person has previously been convicted of the crimes listed in subdivision (b) two or more times.
(2) The date that two or more of the prior crimes were committed was within 36 months of the date of the commission of the crime for which the person is being punished under this subdivision.
(b) (1) Shoplifting of an item with a value of more than nine hundred fifty dollars ($950).
(2) Forgery relating to a check, bond, bank bill, note, cashier’s check, traveler’s check, or money order, where the value of the check, bond, bank bill, note, cashier’s check, traveler’s check, or money order does not exceed nine hundred fifty dollars ($950).
(3) A violation of Section 476a where the amount of all checks, drafts, or orders is more than four hundred fifty dollars ($450) but less than nine hundred fifty dollars ($950).
(4) Petty theft of any of the following:
(A) Domestic fowls, avocados, olives, citrus or deciduous fruits, other fruits, vegetables, nuts, artichokes, or other farm crops with a value exceeding two hundred fifty dollars ($250) but less than nine hundred fifty dollars ($950).
(B) Fish, shellfish, mollusks, crustaceans, kelp, algae, or other aquacultural products are taken from a commercial or research operation with a value exceeding two hundred fifty dollars ($250) but less than nine hundred fifty dollars ($950).
(C) Property taken from the person of another with a value of less than nine hundred fifty dollars ($950).
(D) An automobile with a value of less than nine hundred fifty dollars ($950).
(5) A violation of Section 496 where the property has a value of less than nine hundred fifty dollars ($950).
(6) Unless upon the written prescription of a physician, dentist, podiatrist, or veterinarian licensed to practice in this state, possession of a controlled substance that is any of the following:
(A) Specified in subdivision (b) or (c) or paragraph (1) of subdivision (f) of Section 11054 of the Health and Safety Code.
(B) Specified in paragraph (14), (15), or (20) of subdivision (d) of Section 11054 of the Health and Safety Code.
(C) Specified in subdivision (b) or (c) of Section 11055 of the Health and Safety Code.
(D) Specified in subdivision (h) of Section 11056 of the Health and Safety Code.
(E) A controlled substance classified in Schedule III, IV, or V that is a narcotic drug.
(7) Violation of Section 11357 or 11377 of the Health and Safety Code.
(c) In addition to the provisions of subdivision (a), a person who is convicted of a crime of petty theft may be punished either by imprisonment for not more than a year in a county jail or by imprisonment pursuant to subdivision (h) of Section 1170 if the following criteria are met:
(1) The person has been convicted two or more times of petty theft, grand theft, auto theft pursuant to subdivisions (d) or (e) of Section 10851 of the Vehicle Code, burglary, carjacking, robbery, or a felony violation of Section 496, or a combination of those crimes.
(2) The date that two or more of the prior crimes were committed was within 36 months of the date of the commission of the crime for which the person is being punished under this subdivision.