
671 P.2d 968 (1983)
The PEOPLE of the State of Colorado, Plaintiff-Appellee,
v.
Grady Morris MATHESON, Defendant-Appellant.
Nos. 82CA0707, 82CA0592.
Colorado Court of Appeals, Div. I.
March 17, 1983.
Rehearing Denied April 7, 1983.
Certiorari Denied September 26, 1983.
*970 J.D. MacFarlane, Atty. Gen., Charles B. Howe, Deputy Atty. Gen., Joel W. Cantrick, Sol. Gen., Marie Volk Bahr, Asst. Atty. Gen., Denver, for plaintiff-appellee.
John Randolph Torbet, Colorado Springs, for defendant-appellant.
STERNBERG, Judge.
The defendant, Grady Morris Matheson, was sentenced to a term of six months in the county jail for violation of a temporary restraining order entered in a dissolution of marriage action. He was subsequently convicted of second-degree sexual assault, and he appeals, contending that constitutional and statutory double jeopardy clauses barred the criminal prosecution. We affirm.
In the dissolution of marriage proceeding the court had entered an order restraining Matheson from talking to or interfering with his wife, or her daughter by a previous marriage, at their residence or any other place he encountered them, and from loitering at or near their residence. At a hearing on a contempt citation for violation of this order, testimony was presented that early one morning Matheson entered the residence and sexually assaulted his stepdaughter. Matheson's wife testified that she had given permission for Matheson to be at the house when it was otherwise unoccupied to see his two children and to pack his belongings. Based upon this, Matheson claimed that he had permission to be on the premises.
After hearing this evidence, the court stated: "You are in contempt of court .... I told you to stay away; you didn't do that." When defendant remonstrated, the court further stated: "Apparently you did a little more than go by permission this time because there was a sexual assault involved in addition to simply going in. Either one of those things is sufficient."
Under the Fifth Amendment and Colo. Const. Art. II, Sec. 18, an accused may not be placed in jeopardy twice for the same offense. See also § 18-1-302, C.R.S. 1973 (1978 Repl.Vol. 8); People v. Williams, 651 P.2d 899 (Colo.1982). And, this prohibition against double jeopardy relates to criminal or quasi-criminal actions. E.F. Hutton & Co., Inc. v. Anderson, 42 Colo. App. 497, 596 P.2d 413 (1979).
The sentence imposed here was for a period of definite duration. Matheson could not obtain his release by proving his willingness to comply with the order; thus, the order was punitive not remedial. Marshall v. Marshall, 35 Colo.App. 442, 536 P.2d 845 (1975), rev'd in part on other grounds, 191 Colo. 165, 551 P.2d 709 (1976). We conclude, as have other jurisdictions, that when an individual imprisoned for contempt is given a punitive sentence, as opposed to a remedial sentence, the proscriptions against double jeopardy apply. See In Re Grand Jury Proceedings, Horak, 625 F.2d 767 (8th Cir.1980), cert. denied sub nom. Horak v. United States, 449 U.S. 840, 101 S.Ct. 117, 66 L.Ed.2d 47 (1980); Simanonok v. O.E. Randle, 388 So.2d 45 (Fla.App.1980); People v. Gray, 69 Ill.2d 44, 12 Ill.Dec. 886, 370 N.E.2d 797 (1977). Cf. State v. Thompson, 57 Or.App. 281, 644 P.2d 608 (1982).
Thus, while double jeopardy principles apply, we conclude that prosecution for the criminal offense here was not barred by the finding and sentence based thereon that Matheson had been in contempt of court.
When a defendant is prosecuted for violation of a different provision of law than that on which a former prosecution was based, the collateral estoppel aspects of *971 double jeopardy apply. Jeffrey v. District Court, 626 P.2d 631 (Colo.1981). These principles, which are codified at § 18-1-302, C.R.S. 1973 (1978 Repl.Vol. 8), provide that a subsequent prosecution is barred when it is for the same conduct unless it and the former acquittal or conviction each requires proof of a fact not required by the other.
This statute is designed to protect a defendant from having to relitigate an issue of ultimate fact once it has been determined by a valid and final judgment. Ashe v. Swenson, 397 U.S. 436, 90 S.Ct. 1189, 25 L.Ed.2d 469 (1970); People v. Horvat, 186 Colo. 202, 527 P.2d 47 (1974). When a previous judgment was based on a general verdict, a court is required to examine the record, taking into account the pleadings, evidence, charge, and other relevant matters, and conclude whether a rational jury could have grounded its verdict upon an issue other than that which the defendant seeks to foreclose. Ashe v. Swenson, supra.
We are not faced with a general jury verdict here. We have the aid of the court's findings to guide our determination of whether the same conduct and facts were the subject of the second prosecution. Taking into account the limited testimony presented at the contempt hearing, and the absence of any inquiry into the elements of sexual assault as defined by § 18-3-403, C.R.S. 1973 (1978 Repl.Vol. 8), we conclude that the court's finding of contempt was not based on a finding that Matheson committed the crime of sexual assault. Cf. People v. Gray, supra; People v. Holmes, 54 Ill.App.3d 843, 11 Ill.Dec. 498, 368 N.E.2d 1106 (1977).
Nor does the doctrine of collateral estoppel require a contrary result. That doctrine is an integral part of the concept of double jeopardy so that an individual who has been "forced to run the gauntlet once" cannot be subjected to repeated trials of the same issue against the state with all its resources and power. Green v. United States, 355 U.S. 184, 78 S.Ct. 221, 2 L.Ed.2d 199 (1957). Matheson was not forced to "run the gauntlet" in the brief hearing on contempt in the sense to which his constitutional protection applies; thus, the criminal prosecution did not violate the bar against his being twice put in jeopardy for the same offense.
Defendant also argues he was entitled to six months credit against his sentence for sexual assault for presentence confinement under the contempt order. We disagree.
One who is confined prior to the imposition of sentence is entitled to credit for the period of confinement when sentenced to the department of corrections. Section 16-11-306, C.R.S. 1973 (1982 Cum. Supp.); Castro v. District Court, 656 P.2d 1283 (Colo.1982). However, when a defendant is confined prior to sentencing for a different transaction from that for which he is to be sentenced, he is not entitled to credit. See People v. Saiz, 660 P.2d 2 (Colo. App.1982).
The judgment is affirmed.
COYTE and BERMAN, JJ., concur.
