
    The STATE of Florida, Appellant, v. R.F., a juvenile, Appellee.
    No. 94-1726.
    District Court of Appeal of Florida, Third District.
    Jan. 4, 1995.
    Robert A. Butterworth, Atty. Gen., and Mark C. Katzef, for appellant.
    Bennett H. Brummer, Public Defender, and Julie M. Levitt, Sp. Asst. Public Defender, for appellee.
    Before COPE, LEVY and GODERICH, JJ.
   COPE, Judge.

The State appeals a sentencing order in a juvenile delinquency case. We reverse.

R.F. pled no contest to the charge of carrying a concealed firearm. Paragraph 790.22(9)(a), Florida Statutes (Supp.1994), provides, in part:

(9) Notwithstanding s. 39.043, if the minor is found to have committed an offense that involves the use or possession of a firearm, as defined in s. 790.001, other than a violation of subsection (3), or an offense during the commission of which the minor possessed a firearm, and the minor is not committed to a residential commitment program of the Department of Health and Rehabilitative Services, in addition to any other punishment provided by law, the court shall order:
(a) For a first offense, that the minor serve a mandatory period of detention of 5 days in a secure detention facility and perform 100 hours of community service.
The minor shall receive credit for time served before adjudication.

(Emphasis added).

At the disposition hearing it was undisputed that the juvenile was entitled to credit for two days’ time served. This left a remainder of three days to be served on the mandatory five day term.

The trial court interpreted the term “day” as used in paragraph 790.22(9)(a) to mean an eight-hour working day. Consequently, the court directed that R.F. serve three eight-hour days at the detention facility. The State has appealed.

We must respectfully disagree with the trial court’s interpretation of the statute. We think that the legislature intended the term “day” to refer to a 24-hour period of time, not to an 8-hour work day. Since R.F. received credit for two days’ time served and has subsequently served an additional 24 hours of detention, it follows that two days remain to be served on the required mandatory minimum sentence.

We agree with R.F. that the trial court has discretion in deciding how the mandatory term is to be served. For example, where the juvenile is attending school or is working, the trial court has the discretion to direct that the mandatory term be served on weekends. We express no view on how the remainder of the mandatory term should be served in this case, but only explain that we believe that the trial court has discretion in the matter.

The dispositional order is reversed and the cause remanded for imposition of the mandatory term of detention in accordance with this opinion.

Reversed and remanded. 
      
      . In our view this appeal is properly entertained as a State appeal from an illegal sentence. See § 39.069(l)(b)(5), Fla.Stat. (1993). Where, as here, the trial court imposes a sentence which is shorter than a required mandatory minimum sentence, the sentence is not within the limits prescribed by law and is properly viewed as an "illegal" sentence. See State v. Lopez, 408 So.2d 744 (Fla. 3d DCA 1982); see also State v. F.G., 630 So.2d 581, 583 (Fla. 3d DCA 1993) (omission of mandatory penalty renders disposition illegal), opinion adopted, State v. F.G., 638 So.2d 515 (Fla.1994); cf. D’Alessandro v. Shearer, 360 So.2d 774, 775 (Fla.1978) (granting mandamus to compel the imposition of a required mandatory minimum sentence).
     
      
      . Neither party has voiced any complaint regarding the calculation of credit for time served. In our view the legislature did not intend to modify the usual and customary methods for calculation of credit for time served.
     