Where offenses occurred both before and after the October 1, 2011 effective date of amendments to Penal Code section 4019, defendant was entitled to additional conduct credit as provided by the amendment. Ramirez pleaded no contest to 19 sex offenses prior to his preliminary hearing, some of which occurred on specific dates prior to October 1, 2011, and some after that date. Some of the offenses were alleged to have occurred between May or June of 2011 and November 2011. Because the Legislature amended section 4019 to award presentence credits at a higher rate for prisoners incarcerated for crimes committed after October 1, 2011, the dates of the offenses were significant. The trial court awarded custody credits under the prior less generous version of the law and Ramirez appealed, arguing that his presentence custody credits should be calculated under the October 1, 2011 version of section 4019. The Attorney General argued that he was not entitled to more credits, since some of his offenses occurred before the October 1 date. The appellate court noted that Section 4019 does not provide for how to calculate credits for a defendant who pleads to committing offenses before and after October 1, 2011. Since the statute is silent on how to resolve this impasse, the court turned to the rule of lenity, and held that the interpretation more favorable to the defendant should apply. Therefore, the judgment was modified to award Ramirez additional presentence credits under the October 1, 2011 version of section 4019.