
930 So.2d 587 (2006)
J.I.S., a child, Petitioner,
v.
STATE of Florida, Respondent.
No. SC05-1097.
Supreme Court of Florida.
May 11, 2006.
*589 Nancy A. Daniels, Public Defender, John W. Hedrick and P. Douglas Brinkmeyer, Assistant Public Defenders, Second Judicial Circuit, Tallahassee, FL, for Petitioner.
Charles J. Crist, Jr., Attorney General, Robert R. Wheeler, Bureau Chief, Criminal Appeals, and Trisha Meggs Pate, Assistant Attorney General, Tallahassee, FL, for Respondent.
PARIENTE, C.J.
Is a juvenile delinquent who receives an indeterminate residential commitment to the Department of Juvenile Justice (DJJ) entitled to credit for time served in secure detention before the commitment? The First District Court of Appeal, whose decision we review, answered this question in the negative but certified conflict "[t]o the extent our opinion conflicts with E.R. v. State, 584 So.2d 158 (Fla. 2d DCA 1991), L.K. v. State, 729 So.2d 1011 (Fla. 4th DCA 1999), J.B. v. State, 829 So.2d 376 (Fla. 4th DCA 2002), and C.C. v. State, 841 So.2d 657 (Fla. 4th DCA 2003)." J.I.S. v. State, 902 So.2d 890, 892 (Fla. 1st DCA 2005). We exercise our discretionary jurisdiction *590 to resolve the certified conflict. See art. V, § 3(b)(4), Fla. Const.
We agree with the First District that on an "indeterminate" commitment, which is a residential commitment on which DJJ retains authority over the offender until he or she reaches a statutorily prescribed age, precommitment credit for time served in secure detention is not required by any court rule, statute, or constitutional provision. Accordingly, we approve the First District's decision. However, to ensure that commitments will not exceed statutory limits, credit is required on a "determinate" commitment for an offense such as a misdemeanor that will necessarily conclude before the juvenile reaches the age at which DJJ's authority ends. To the extent that the First District's certification of conflict suggests that other district courts have held that credit is required on indeterminate commitments, we clarify this important distinction. We therefore disapprove the Second District's failure to distinguish determinate and indeterminate commitments in requiring credit in E.R., but approve the Fourth District's requirement of credit on determinate sentences in L.K., J.B., and C.C.

FACTS AND PROCEDURAL HISTORY
J.I.S. was taken into custody and placed in secure detention on a charge of lewd or lascivious battery on a person under sixteen, a second-degree felony. His case was continued five times and he remained in secure detention for eighty-six days pending an adjudicatory hearing. After finding J.I.S. guilty, the trial court again ordered that he remain in secure detention. By the time of his disposition hearing, he had been in secure detention for 107 days.[1] In the disposition hearing, the trial court imposed a high-risk commitment to DJJ followed by postcommitment probation. The trial court denied J.I.S.'s oral request for credit for time served in secure detention. The written "Sentencing Order and Judgment" form is silent as to predisposition credit.
J.I.S. appealed. His appellate counsel filed a motion to correct disposition error under Florida Rule of Juvenile Procedure 8.135(b)(2). The motion requested credit for the 107 days served in secure detention before disposition. Following a hearing, the trial court granted the motion "in principle" but denied it "in reasonable effect." The trial court concluded that because J.I.S.'s commitment on a second-degree felony punishable by a fifteen-year sanction was indefinite, credit for time served would have no real meaning.
The First District affirmed the denial of credit, giving two reasons. First, the court observed that because juvenile commitments are indeterminate in length, there is no definite point against which credit for time served could be subtracted. Thus, "an award of credit for time served in secure detention would have no effect on the length of a juvenile's commitment, and would be a futile exercise and a waste of judicial resources." J.I.S., 902 So.2d at 890. Second, the court relied on the difference in purposes served *591 by incarceration in the adult criminal and juvenile justice systems. According to the First District, credit for time served is consistent with the punitive purpose of incarceration in the criminal justice system in that it limits the overall duration of imprisonment to the term imposed by the sentencing court. See id. at 891. In contrast, a juvenile delinquency commitment serves the primary purpose of rehabilitation or treatment, and concludes when the offender is rehabilitated or treated. "That treatment or rehabilitative effort may take longer in some situations than in others. The time required depends on how well the juvenile responds. Accordingly, the rationale for awarding credit for time served is not applicable in the juvenile context." Id. at 892.
In a separate opinion concurring in the judgment, Judge Benton noted that because a juvenile delinquency commitment cannot exceed the maximum sentence that could be imposed for the crime in the criminal justice system, credit for time served in secure detention could determine the date the juvenile must be released on a commitment for a misdemeanor. He also pointed out that an adjudication on a felony such as lewd or lascivious battery could subsequently be reduced to the misdemeanor of simple battery, for which a commitment could not exceed one year. Therefore, "[t]he better practice, in my view, is for the trial judge to note in the disposition order any time the juvenile has already spent in confinement. Making such a finding would prove useful in some cases and should not prove anti-therapeutic in any way." Id. at 893 (Benton, J., concurring in the judgment).

ANALYSIS
This case presents the issue of a juvenile's entitlement to credit for time served in secure detention against a residential commitment to DJJ. The facts are not in dispute. In a recent decision concerning entitlement to jail credit on an adult sentence, we addressed the issue de novo. See Moore v. State, 882 So.2d 977, 980 (Fla.2004). The same review standard applies here. In addressing the issue, we look to the sources of the requirement of presentencing jail credit; the differences in adult criminal sentencing and juvenile delinquency sentencing, both in purpose and operation; and pertinent district court precedent, including the decision below and the certified conflict cases.

CREDIT FOR TIME SERVED IN THE CRIMINAL JUSTICE SYSTEM
An adult offender sentenced to a term of imprisonment is statutorily entitled to credit for time served in county jail before imposition of sentence:
A sentence of imprisonment shall not begin to run before the date it is imposed, but the court imposing a sentence shall allow a defendant credit for all of the time she or he spent in the county jail before sentence. The credit must be for a specified period of time and shall be provided for in the sentence.
§ 921.161(1), Fla. Stat. (2005). Relying on the mandatory language of this provision, this Court has held that "a sentence that does not mandate credit for time served would be illegal since a trial court has no discretion to impose a sentence without crediting a defendant with time served." State v. Mancino, 714 So.2d 429, 433 (Fla. 1998). Under Mancino, the failure to grant full presentencing credit is cognizable in a motion to correct an illegal sentence filed under Florida Rule of Criminal Procedure 3.800(b). See id. The trial court must specify presentence jail credit even in imposing a sentence of life imprisonment. See Jenkins v. State, 346 So.2d 1055, 1055 (Fla. 2d DCA 1977) (holding *592 that under section 921.161(1), the "trial court should have specified how much credit time appellant was entitled to have notwithstanding the imposition of a life sentence"); Sutton v. State, 334 So.2d 628, 629 (Fla. 4th DCA 1976) (ordering credit for time served against twenty-five-year minimum term on life sentence).

PRECOMMITMENT CREDIT IN THE JUVENILE DELINQUENCY SYSTEM
No provision corresponding to section 921.161 exists in chapter 985, Florida Statutes, which governs juvenile delinquency proceedings, or in the Florida Rules of Juvenile Procedure. Therefore, the obligation to give juveniles credit for time served in secure detention "was born of judicial interpretation." C.C., 841 So.2d at 658. Precedent on this issue reflects a distinction in adult and juvenile sentencing. In the criminal justice system, the maximum sentence for an offense is prescribed by statute. See § 775.082, Fla. Stat. (2005). Section 985.231(1)(d), Florida Statutes (2005), ties the length of the maximum juvenile commitment to "the maximum term of imprisonment that an adult may serve for the same offense." However, this provision also imposes a second ceiling for commitments on crimes such as the second-degree felony in this case, in which the commitment could in theory last long into the offender's adulthood. In cases such as this, the juvenile's age rather than the maximum adult punishment determines the maximum potential commitment. In most instances, these commitments must conclude no later than the offender's twenty-first birthday. See § 985.231(1)(d) ("Notwithstanding s. 743.07 and this subsection, and except as provided in ss. 985.201 and 985.31, a child may not be held under a commitment from a court under this section after becoming 21 years of age."). Courts sometimes refer to commitments circumscribed by the maximum adult punishment as "determinate" and those limited only by the offender attaining a certain age as "indeterminate." C.C., 841 So.2d at 658. As will be seen, this distinction is crucial in determining entitlement to credit for time served in secure detention.
One of the first district court decisions requiring precommitment credit in juvenile delinquency cases was the 1991 decision in E.R. There the Second District held that a juvenile offender was entitled to credit for time served in secure detention on a juvenile commitment for three felonies and a misdemeanor. See E.R., 584 So.2d at 158. In requiring that the credit be granted, the Second District relied on Tal-Mason v. State, 515 So.2d 738 (Fla.1987), in which this Court held that an individual must be granted credit for time served in a state mental institution while incompetent to stand trial on a criminal charge against a sentence subsequently imposed upon conviction. In E.R., the Second District applied Tal-Mason's requirement of presentence credit for time spent in "any institution serving as the functional equivalent of a county jail," id. at 740, to secure juvenile detention. The court reasoned that "[a]lthough rehabilitation may outweigh retributive punishment as a purpose of the Florida Juvenile Justice Act, secure detention closely resembles county jail in that appellant is deprived of his liberty, and is in the total custody and control of the state at all times." E.R., 584 So.2d at 158. The Second District in E.R. did not distinguish felonies and misdemeanors for purposes of precommitment credit. The court remanded for the trial court to grant the credit "against the period of commitment which shall terminate at his nineteenth birthday, or as otherwise provided by *593 law." Id.[2]
As reflected in E.R., the law provides alternative ceilings on a juvenile commitment. Section 985.231(1)(d) provides in pertinent part:
Any commitment of a delinquent child to the department must be for an indeterminate period of time, which may include periods of temporary release; however, the period of time may not exceed the maximum term of imprisonment that an adult may serve for the same offense, except that the duration of a minimum-risk nonresidential commitment for an offense that is a misdemeanor of the second degree, or is equivalent to a misdemeanor of the second degree, may be for a period not to exceed 6 months . . . . Notwithstanding s. 743.07 and this subsection, and except as provided in ss. 985.201 and 985.31, a child may not be held under a commitment from a court under this section after becoming 21 years of age.
Under this provision, apart from the exception for second-degree misdemeanors, a juvenile commitment for any offense cannot extend beyond the duration of the punishment authorized for adults in the Criminal Code or the offender's twenty-first birthday, whichever comes first.
The Fourth District issued several opinions on precommitment credit that, unlike the Second District in E.R., recognized a distinction between determinate and indeterminate commitments. In L.K., the Fourth District cited E.R. in requiring credit for time served in secure detention before adjudication against a one-year commitment for the first-degree misdemeanor of simple battery. 729 So.2d at 1011. In D.T. v. State, 820 So.2d 1091 (Fla. 4th DCA 2002), the Fourth District, relying on L.K., ordered that credit for time served in secure detention be granted against the one-year maximum high-risk residential commitment for a first-degree misdemeanor. Id. at 1092. In J.B., the Fourth District ordered that credit for time served in secure detention be granted against a residential commitment for two first-degree misdemeanors and one second-degree misdemeanor. 829 So.2d at 378.
In C.C., the Fourth District followed E.R., L.K., and D.T. in requiring predisposition credit for time served in secure detention against a moderate-risk residential commitment for a misdemeanor. 841 So.2d at 658-59. The court recognized a distinction, for purposes of precommitment credit, between commitments limited by the statutory maximum for the underlying crime and those limited only by the child attaining a certain age:
[I]t is only where a determinate length of commitment exists that such credit can be given any real meaning. This will occur in juvenile misdemeanor cases only where the maximum period of commitment is limited to a year and when the juvenile is committed within one year of reaching the age of nineteen (19).
The juvenile justice system is designed to rehabilitate youth. Accordingly, juveniles are committed for indeterminate lengths of time. It is, therefore, generally impossible to fix a date from which to deduct time spent in secure detention. Perhaps this is why there is no comparable statute [to section 921.161(1)] found in Chapter 985. Nevertheless, *594 this is one of those cases involving a misdemeanor where the credit for time served in secure detention can find certainty.
Id. The Fourth District applied the distinction for felony and misdemeanor commitments in its en banc decision in J.W. v. State, 879 So.2d 680 (Fla. 4th DCA 2004), which involved both. There the child was committed for a second-degree felony, throwing a deadly missile, and criminal mischief, a first-degree misdemeanor. Id. at 681. The Fourth District held that "credit must be given, as it relates to the misdemeanor offense, so J.W. does not receive a disposition greater than the sentence he could have received as an adult." Id. at 682 (emphasis supplied).[3]

PRECOMMITMENT CREDIT AND THE GOALS OF CHAPTER 985
In this case, the First District held that "juveniles whose dispositions are to indeterminate commitment programs are not entitled to credit for time served in secure detention." J.I.S., 902 So.2d at 892.[4] The First District disagreed with E.R.'s reliance on Tal-Mason to require precommitment credit on a commitment potentially lasting until the offender ages out of the juvenile justice system:
In Tal-Mason, the offender was initially committed to receive treatment, then later sentenced to incarceration for a specific period of time. Thus, in that case, granting credit for time served would achieve its goal. The defendant only served, and was coercively denied a liberty interest, for the period of time the court, through its deliberative sentencing process, determined to be appropriate. . . .
However, . . . [t]he juvenile justice system is designed to rehabilitate the offender. See C.C., 841 So.2d at 658. Rehabilitation can be analogized to treatment. Since the juvenile justice system is designed to rehabilitate offenders, a juvenile's disposition is for treatment, not punishment. That treatment or rehabilitative effort may take longer in some situations than in others. The time required depends on how well the juvenile responds. Accordingly, the rationale for awarding credit for time served is not applicable in the juvenile context.
Id. at 891-92.
J.I.S. disputes the First District's determination that rehabilitation is the sole or primary goal of the juvenile justice system generally or a high-risk commitment specifically. He asserts that revisions to the juvenile delinquency laws and the transfer of the statutes from chapter 39 to chapter 985, Florida Statutes, refocused the purposes of the juvenile justice system from rehabilitation to punishment and protection of society. He claims that credit for time served is congruous with these goals.
In fact, punishment has been one of the stated goals of the juvenile delinquency system since 1994. See ch. 94-209, § 9 at 1231, Laws of Fla. The statement of purposes in chapter 985 currently provides:
(1) The purposes of this chapter are:

*595 . . .
(c) To ensure the protection of society, by providing for a comprehensive standardized assessment of the child's needs so that the most appropriate control, discipline, punishment, and treatment can be administered consistent with the seriousness of the act committed, the community's long-term need for public safety, the prior record of the child, and the specific rehabilitation needs of the child, while also providing whenever possible restitution to the victim of the offense.
§ 985.01(1)(c), Fla. Stat. (2005). The statutory definition of high-risk residential commitment, to which J.I.S. was committed, emphasizes the safety of both the public and the juvenile offender:

High-risk residential.  Programs or program models at this commitment level are residential and do not allow youth to have access to the community except that, temporary release providing community access for up to 72 continuous hours may be approved by a court for a youth who has made successful progress in his or her program in order for the youth to attend a family emergency or, during the final 60 days of his or her placement, to visit his or her home, enroll in school or a vocational program, complete a job interview, or participate in a community service project. High-risk residential facilities are hardware-secure with perimeter fencing and locking doors. Facilities shall provide 24-hour awake supervision, custody, care, and treatment of residents. Youth assessed and classified for this level of placement require close supervision in a structured residential setting. Placement in programs at this level is prompted by a concern for public safety that outweighs placement in programs at lower commitment levels. The staff at a facility at this commitment level may seclude a child who is a physical threat to himself or herself or others. Mechanical restraint may also be used when necessary. The facility may provide for single cell occupancy.
§ 985.03(46)(d), Fla. Stat. (2005).
Residential commitments serve protective purposes in two ways. First, residential commitments provide DJJ the opportunity to rehabilitate juvenile offenders so they are not dangerous to themselves or others. Second, residential commitments separate offenders from society during the process of rehabilitation. An indefinite commitment serves both purposes. However, mandatory application of credit for time served in secure detention against the maximum potential commitment could result in the release of offenders while they are still dangerous to themselves or others and before they are rehabilitated. Consequently, mandatory credit on indeterminate commitments is counterproductive to the goals of rehabilitation and protection of society set out by the Legislature in chapter 985.
The ceiling on juvenile residential commitments corresponding to the punishment authorized for the same offense in section 775.082, Florida Statutes, can also preempt rehabilitation and the protection of society. As shown by the commitments in C.C., J.B., D.T., and L.K., on most misdemeanor commitments (and conceivably some for third-degree felonies by particularly young offenders), section 985.231(1)(d) requires a juvenile offender's release from commitment before the jurisdictional age limits are triggered. Juvenile offenders committed for first-degree misdemeanors must be released from their commitments after no more than a year regardless of whether they are rehabilitated or still present a threat to society or *596 themselves. Therefore, as in the criminal justice system, this determinate commitment ceiling ensures proportionality in punishment and fair notice of consequences, rather than protection of society or rehabilitation. Cf. Ellis v. State, 762 So.2d 912, 912 (Fla.2000) ("[A]s to notice, publication in the Laws of Florida or the Florida Statutes gives all citizens constructive notice of the consequences of their actions.") (quoting State v. Beasley, 580 So.2d 139, 142 (Fla.1991)). By further limiting the amount of time served to the authorized punishment, whether in secure detention or residential commitment, credit for time served in secure detention is fully consistent with these goals.
Accordingly, we conclude, as did the Fourth District in J.W., C.C., J.B., D.T., and L.K., that in the case of a determinate commitment, that is, for a crime on which the maximum punishment will necessarily conclude before DJJ loses authority over the offender, the trial court must grant credit for time served in secure detention against the residential commitment. However, as noted by the Fourth District in C.C. and the First District in this case, where the commitment is indeterminate and will necessarily extend up to DJJ's age-based jurisdictional limits, such credit need not be granted. To the extent that the Second District suggested in E.R. that credit is necessitated even in the latter circumstance, it was incorrect.

SPECIFICATION OF PREDISPOSITION TIME SERVED IN SECURE DETENTION
We next address the question of whether trial courts should specify the amount of predisposition time served in commitment orders. This determination is separate from whether credit for time served in secure detention must be awarded. The current form disposition order in Florida Rule of Juvenile Procedure 8.947 includes a line on which to specify the amount of credit for time served in incarceration or secure detention. However, the juvenile rules are otherwise silent on predisposition credit and notation of time served.
It may be beneficial on several levels for the trial court to specify the amount of time served in secure detention prior to residential commitment, even on an indeterminate commitment on which there is no right to credit for the time served. As Judge Benton noted in his opinion concurring in the judgment below, even where the original commitment is for a felony, the adjudication of delinquency could be reduced to a misdemeanor, making precommitment credit relevant to the maximum commitment authorized for the offense. See J.I.S., 902 So.2d at 892-93 (Benton, J., concurring in the judgment). Further, because the information may assist DJJ in structuring a commitment or postrelease program or in determining when the offender has completed a program, "[m]aking such a finding would prove useful in some cases and should not prove anti-therapeutic in any. See In re Gault, 387 U.S. 1, 26, 87 S.Ct. 1428, 18 L.Ed.2d 527 (1967) (noting `suggest[ion] that the appearance as well as the actuality of fairness, impartiality and orderliness. . . may be a more impressive and more therapeutic attitude so far as the juvenile is concerned')." Id. (second and third alterations in original).[5]
*597 The trial court acknowledged the potential benefits of a time-served notation in ruling on J.I.S.'s motion to correct disposition error:
The Defendant here will remain committed until the completion of the course of rehabilitation, and there is no reasonable way to receive credit against this term of commitment for time served in secure detention, unless the officials at the level eight facility should determine in his case that this time was in fact valuable in his rehabilitation. It would seem appropriate only to suggest to the level eight facility that they might consider this. To that extent this Motion is granted, and the level eight facility is ordered to give whatever credit they believe the child is entitled to for his time in secure detention if it helped him complete his level eight program.
However, the trial court in this case did not use the form commitment order in rule 8.947, instead adjudicating J.I.S. delinquent and imposing a high-risk commitment in a "Sentencing Order and Judgment" that did not specify precommitment time served in secure detention.
To address the uncertainty reflected in the trial court's order as to whether predisposition time served in secure detention should be specified, we refer the matter to the Juvenile Procedure Rules Committee to determine whether we should adopt a rule requiring the notation on all residential commitment orders. In the interim, trial courts certainly may specify time served in secure detention in juvenile delinquency commitment orders on indeterminate commitments, and under our holding today must grant credit for the time served when imposing determinate commitments.

CONCLUSION
In this case, the First District held that "juveniles whose dispositions are to indeterminate commitment programs are not entitled to credit for time served in secure detention." J.I.S., 902 So.2d at 892. For the reasons set out in this opinion, we agree, and accordingly approve the First District's decision. We also approve the Fourth District decisions requiring precommitment credit against determinate (i.e., misdemeanor) commitments in C.C., J.B., and L.K., on which the First District certified conflict, and the decisions in J.W. and D.T., which were not discussed below. However, we disapprove the Second District's decision in E.R. because in requiring credit for time served in secure detention "against the period of commitment which shall terminate at [the juvenile's] nineteenth birthday, or as otherwise provided by law," 584 So.2d at 158, the court did not *598 distinguish determinate from indeterminate commitments.
It is so ordered.
WELLS, ANSTEAD, LEWIS, QUINCE, CANTERO, and BELL, JJ., concur.
NOTES
[1]  Section 985.215(5)(c), Florida Statutes (2005), provides that a child may not be held in detention for more that twenty-one days unless an adjudicatory hearing has been commenced. Section 985.215(5)(d) prohibits detention for more than fifteen days following entry of an order of adjudication. Both provisions are subject to an exception set out in subsection (5)(g) of section 985.215, which authorizes nine-day continuances of adjudicatory hearings on charges including "a felony of the second degree involving violence against any individual." The record does not explain the reasons for the continuances in this case.
[2]  Legislation enacted in 1994 increased the maximum duration of a juvenile delinquency commitment from the offender's nineteenth birthday to his or her twenty-first birthday. See ch. 94-209, § 43, at 1294, Laws of Fla. The age terminus for an indeterminate commitment remains twenty-one under chapter 985. See § 985.231(1)(d).
[3]  3. Because L.K., J.B., and C.C., concerned misdemeanor-level commitments, the decisions requiring precommitment credit in those cases are not truly in conflict with the First District's holding in this case that credit is not required on a felony-level commitment.
[4]  In speaking of "indeterminate commitment programs," the First District was referring to commitments for crimes on which the maximum authorized adult punishment would not require termination of the commitment before the child reaches the age when DJJ loses authority.
[5]  It is J.I.S.'s stay in secure detention for more than three months, rather than notation of that fact on a disposition order, that is inconsistent with the juvenile justice system's focus on rehabilitation. As recognized in E.R., secure detention closely resembles county jail. 584 So.2d at 159. Secure detention exists solely to maintain "temporary custody of the child while the child is under the physical restriction of a detention center or facility pending adjudication, disposition, or placement." § 985.03(19)(a), Fla. Stat. (2005). In contrast, juvenile residential facilities "range from wilderness and marine camps to halfway houses, boot camps, youth development centers, sex-offender programs and maximum-security correctional facilities" in which DJJ provides mental health, substance abuse and sex offender treatment to juvenile offenders who need those services. Florida Department of Juvenile Justice, Juvenile Justice Residential Services, http://www. djj.state.fl.us/Residential/index.html (last visited May 5, 2006). Expeditiously moving offenders out of the juvenile equivalent of county jail, see E.R., 584 So.2d at 158, and into commitment programs is consistent with the rehabilitative goals of the juvenile justice system. The sooner an offender leaves secure detention and reaches his or her commitment program, the sooner he or she can benefit from the treatment services and, in the case of determinate commitments, the more time will be available to rehabilitate the juvenile offender before release. We encourage an in-depth review by all branches of government into whether juveniles are routinely spending lengthy periods of time in secure detention and, if so, the reasons therefor and the possible remedies.
