Prospective application of the October 1, 2011 amendment to Penal Code section 4019 (presentence credits) does not violate a defendant’s right to equal protection. In 2010, appellant was convicted of stalking (Pen. Code, § 646.9, subd. (a)). A prior serious felony was found true. Appellant 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 for enumerated classes of prisoners who were previously denied those credits under prior versions of the statute (i.e., those convicted of serious felonies, or who had serious/violent felony priors, or were required to register as a sex offender).” However, subdivision (h) of the most recent version of section 4019, provides that the enhanced credits apply prospectively to defendants who commit a crime on or after October 1, 2011. For purposes of an equal protection analysis, those defendants who committed their crimes prior to October 1, 2011 are similarly situated to those whose offenses occurred after October 1. However, legislation which creates a sentencing disparity with respect to calculation of presentence credits does not affect a fundamental right and will not violate equal protection “if it bears a rational relationship to a legitimate state purpose.” The amendments to section 4019 were enacted “to address the state’s fiscal emergency by effectuating an earlier release of a defined class of prisoners.” The Legislature may have determined that the “nature and scope” of this emergency required extending the enhanced credits to the previously excluded defendants only after October 1, 2011. This is a rational balance between the state’s financial concerns and its interest in preserving public safety. The prospective application of the more favorable credits does not violate equal protection principles.