Prospective only application of the October 1, 2011 amendment to Penal Code section 4019 (presentence credits) does not violate a defendant’s right to equal protection of the law. The defendant was sentenced to state prison for a serious felony on February 28, 2011. On appeal, defendant argued in part that he should have received day-for-day credits pursuant to the October 1, 2011 amendment to section 4019, which extended a more favorable formula to defendants who have a current or prior serious felony and who were previously denied those credits under prior versions of the statute. The express provision of subdivision (h) of current section 4019, provides that the enhanced credits apply prospectively to defendants whose crime was committed on or after October 1, 2011. Credit for good conduct, as opposed to credit for actual time in custody, serves a distinct and prospective function – to induce good conduct. An offender’s conduct cannot be retroactively influenced. This provides a rational basis for prospective only application of the law. A statute that lessens the punishment for certain offenses may be made prospective only without offending equal protection because it may be assumed the Legislature sought to optimize the deterrent effect of the laws. The previously excluded categories of offenders involved a discernable list of offenses (e.g., cases involving Penal Code sections 290, 1192.7, subd. (c), and 667.5, subd. (c)), thus, the October 1, 2011 changes to section 4019 lessened the punishment for certain offenses to preserve the deterrent effect of the laws, reflecting a rational basis for prospective only application of the new law.