delivered the opinion of the court:
On April 8,1976, defendant Melvin G. Colclasure pleaded guilty in the Circuit Court of Moultrie County to the offense of reckless driving and was sentenced to 30 days of periodic imprisonment. The principle *989condition of that imprisonment was that he be released from confinement 40 hours during each week for the sole purpose of continuing his employment and schooling. On April 27, 1976, a petition was filed charging that defendant had failed to attend class on several days that he was discharged from the jail for that purpose. The petition sought the entry of a rule for defendant to show cause why he should not be held in contempt of court. On May 10,1976, a hearing on a similar but amended petition was held, defendant was found to be in contempt of court for violation of the conditions of his probation as set forth in the amended petition, and he was sentenced to 14 days in jail. He appeals.
The defendant argues that the court erred, (a) in denying him a jury trial, (b) because the amended petition was not verified until time of hearing, (c) because the evidence was insufficient to support the finding, and (d) because the order allegedly violated was so vague and uncertain as to deny him due process. Although the question has not been raised by the parties, we are most concerned with the more basic question of whether contempt is a proper sentence for violation of the conditions of a sentence to periodic imprisonment.
Section 5 — 5—3(a) of the Unified Code of Corrections (Ill. Rev. Stat. 1973, ch. 38, par. 1005 — 5—3(a)) provides that depending upon the nature of the offense for which a defendant is convicted, the court may sentence that defendant to imprisonment, periodic imprisonment, probation, conditional discharge or to pay a fine. Section 5 — 7—1(a) of the Code (Ill. Rev. Stat. 1973, ch. 38, par. 1005 — 7—1(a)) states that periodic imprisonment is a “sentence of imprisonment during which the committed person may be released for periods of time ” ° Thus, the sentence is similar to imprisonment in that incarceration is always part of the punishment. By the terms of section 5 — 6—3(a) of the Code (Ill. Rev. Stat. 1973, ch. 38, par. 1005 — 6—3(d)), however, a person sentenced to probation or conditional discharge may be ordered to spend not to exceed 6 months in jail as a condition of the sentence. Moreover, in most other respects under the Code, the incidents of periodic imprisonment are similar to those of probation and conditional discharge. Under each sentence, the court retains jurisdiction throughout the term of the sentence. (Sections 5 — 6—3(f) and 5 — 7—7.) Each sentence is subject to conditions (sections 5 — 6—3 and 5 — 7—1) and the procedure for dealing with the violations is the same. (Sections 5 — 6—4 and 5 — 7—2.) Each sentence may be revoked and a more serious type of sentence imposed. (Sections 5 — 6—4(e) and 5 — 7—2(c).) The code does not expressly provide for contempt as a sanction for violations of the conditions of either periodic imprisonment, probation or conditional discharge.
Prior to the effective date of the Code of Criminal Procedure (Ill. Rev. Stat. 1963, ch. 38, pars. 101 — 1 to 126 — 1) on January 1,1963, section 4 of *990“An Act providing for a system of probation * * * ” (Ill. Rev. Stat. 1963, ch. 38, par. 787) provided that whdn conditions of probation which had been imposed by the court as a matter of discretion were violated, contempt of court was the only sanction for the violation. (See People v. Franciere (1964), 47 Ill. App. 2d 436, 198 N.E.2d 170.) This provision was not expressly retained in the Code of Criminal Procedure nor later incorporated in the Unified Code of Corrections. Section 5 — 6—4(h) of the original Code of Corrections (Ill. Rev. Stat. 1972 Supp., ch. 38, par. 1005 — 6—4(h)) gave credit upon any sentence of imprisonment imposed after revocation of probation for time served upon probation or conditional discharge. The comments of the drafting group for the Code (Ill. Ann. Stat., ch. 38, par. 1005 — 6—4, Council Commentary (SmithHurd 1973)) stated that the effect of giving credit for time served was to diminish the effect of a probation after the probationer had served a time equal to the maximum sentence of imprisonment permitted for the offense for which the individual had been sentenced to probation because, upon revocation the probationer would automatically receive full credit for any sentence that could be imposed. The comments noted, however, that some sanction could be imposed because “the court retains the sanctions of criminal contempt and fining the offender for violating the conditions of probation.” The comments in regard to section 5 — 7—2, which provide that the procedures for modification and revocation of periodic imprisonment shall be the same as those for probation and conditional discharge, state in part, “This section brings periodic imprisonment into line with other revocable sentences * * * under the Code.” (Ill. Ann. Stat., ch. 38, par. 1005 — 7—2, Council Commentary (Smith-Hurd 1973).) Although section 5 — 6—4 has been amended to provide that the court may refuse to give credit for time served on probation or conditional discharge, section 5 — 7—2(c) still makes it mandatory that a person whose periodic imprisonment has been revoked receive full credit upon a subsequent sentence of imprisonment for time served on periodic imprisonment. Thus, the sanction of contempt continues to be needed as a sanction during the later periods of a sentence of periodic imprisonment.
“All courts are vested with an inherent power to punish for contempt as an essential incident to the maintenance of their authority.” (People v. Javaras (1972), 51 Ill. 2d 296, 299, 281 N.E.2d 670, 671.) At common law, the court had power to treat a willful disobedience of an order, such as that upon a defendant to appear, as a criminal contempt punishable by a term of incarceration. (Green v. United States (1958), 356 U.S. 165, 2 L. Ed. 2d 672, 78 S. Ct. 632.) An order of sentence to periodic imprisonment setting forth conditions is similar to an order for a defendant’s appearance. In People v. Person (1973), 44 Mich. App. 630, 205 N.W.2d 610, the availability of another statutory sanction was ruled to *991prevent the imposition of contempt but no Illinois cases have followed that rule. To do so would seem to violate the statement in People ex rel. Rusch v. White (1929), 334 Ill. 465, 166 N.E. 100, that the legislature may not prohibit the courts from punishing as contempt that which is contempt. If the Michigan rule were in force, the legislature could prevent the use of the contempt sanction merely by providing another method of sanctioning the conduct. Rather, the Illinois rule is that if conduct is both contemptuous and otherwise criminal, sanctioning by contempt bars subsequent prosecution as a crime on double jeopardy grounds. (People v. Gray (1976), 36 Ill. App. 3d 720, 344 N.E.2d 683.) Although the combined effect of a sentence to periodic imprisonment and a subsequent contempt sentence for violation of the conditions of the sentence could result in a longer sentence than statutorily provided for the offense for which the defendant was originally sentenced, it must be considered that the contempt sentence is being imposed not for the original offense as is the case upon a revocation, but for the damage caused to the court by the breach of its authority. The punishment imposed must be measured by and limited to the gravity of the contemptuous conduct. See 17 Am Jur. 2d Contempt § 105, at 91 (1964).
Because of the statutory history of use of the contempt sanction for probation violations, the similarity between sentences of probation and periodic imprisonment and analogy to the common law treatment of sanctioning willful violations of other court orders by contempt, we conclude that a trial court is empowered to punish a willful violation of a condition of periodic imprisonment by holding the violator in indirect criminal contempt.
The other questions in the case are less complicated. Since the trial judge announced before hearing that neither confinement in excess of 6 months incarceration nor a fine in excess of *500 would be imposed and no sentence of such severity was imposed, defendant had no right to jury trial. (Bloom v. Illinois (1968), 391 U.S. 194, 20 L. Ed. 2d 522, 88 S. Ct. 1477; County of McLean v. Kickapoo Creek, Inc. (1972), 51 Ill. 2d 353, 282 N.E.2d 720.) The verification of the amended petition at time of hearing was sufficient to cure any defect caused by lack of earlier verification. Defendant’s theory that the evidence was insufficient is based upon the fact that he testified under oath denying that he violated the order. The doctrine of purgation of contempt by oath, however, has been abandoned in this state. (People v. Gholson (1952), 412 Ill. 294, 106 N.E.2d 333.) The order was sufficiently clear to advise defendant that he was to be either working or attending class during his periods of release.
We affirm the finding of contempt and the sentence imposed.
MILLS, J., concurs.