
874 P.2d 241 (1994)
Vincent YELLOWBEAR, Sr., Appellant (Defendant),
v.
The STATE of Wyoming, Appellee (Plaintiff).
No. 93-123.
Supreme Court of Wyoming.
May 19, 1994.
*242 Leonard D. Munker, State Public Defender, Gerald M. Gallivan, Director of Defender Aid Program, and Diane M. Lozano, Student Intern for Defender Aid Program, for appellant.
Joseph B. Meyer, Atty. Gen., Sylvia Lee Hackl, Deputy Atty. Gen., D. Michael Pauling, Sr. Asst. Atty. Gen., Theodore E. Lauer, Director of Prosecution Assistance Program, and Doni M. Phillips, Student Intern for Prosecution Assistance Program, for appellee.
Before MACY, C.J., and THOMAS, CARDINE, GOLDEN and TAYLOR, JJ.
MACY, Chief Justice.
Appellant Vincent YellowBear, Sr. appeals from the order which denied his motion to correct an order revoking his probation.
We reverse and remand.
I. Whether the trial court erred by denying Mr. Yellow[B]ear's motion to correct probation revocation order in refusing to credit Mr. Yellow[B]ear's prison sentence *243 with presentence confinement in the Fremont County jail.
II. Whether the trial court erred by denying Mr. Yellow[B]ear's motion to correct probation revocation order in refusing to credit Mr. Yellow[B]ear's prison sentence with time served in a community correctional facility in Casper.
III. Whether the trial court erred by denying Mr. Yellow[B]ear's motion to correct probation revocation order in refusing to credit Mr. Yellow[B]ear's prison sentence with time spent in alcohol rehabilitation in the Thunder [C]hild Treatment Center in Sheridan and in the Sho-Rap Treatment Center in Ft. Washakie.
A Riverton police officer was dispatched to 1503 West Main Street on August 28, 1991, in response to a call which reported that Appellant was intoxicated and would not leave the house. When the officer arrived, he observed Appellant knocking his wife off the porch and pushing his children out of the way while he was fleeing into the house. The officer followed Appellant into the house. Upon seeing Appellant draw a kitchen knife from his waistband and take a step forward, the officer drew his service revolver and ordered Appellant to drop the knife. Appellant made no attempt to drop the knife and, instead, took another step toward the officer. The officer immediately kicked Appellant on the thigh, causing him to go down to the floor and drop the knife. The officer handcuffed Appellant and placed him in confinement. Appellant was charged with and pleaded not guilty to attempting to cause bodily injury to a peace officer (first offense).
Appellant remained in the Fremont County jail until November 22, 1991, when he was admitted to the Thunder Child Treatment Center in Sheridan, Wyoming, for alcoholism treatment. Appellant completed the Thunder Child program and returned to jail on December 20, 1991. On December 30, 1991, he was released on his own recognizance to await his trial.
On March 21, 1992, Appellant was arrested (second offense) for driving a vehicle while he was under the influence of alcohol. On March 23, 1992, the prosecutor filed a motion for revocation of the release order for Appellant's first offense, contending that Appellant had violated the conditions of his release. On April 22, 1992, after entering into a plea agreement on the first offense, Appellant pleaded no contest to possession of a deadly weapon with unlawful intent in violation of WYO.STAT. § 6-8-103 (1988).
The district court sentenced Appellant for his first offense, ordering him to serve a term in the Wyoming State Penitentiary of not less than two years nor more than four years with a credit of ninety-eight days for presentence confinement being given toward both the minimum and the maximum terms of his sentence. The district court suspended Appellant's sentence and placed him on supervised probation for a period of three years. The court's probation order required Appellant to first attend and complete the substance abuse program at the Sho-Rap Lodge in Fort Washakie, Wyoming, and to then attend Community Alternatives of Casper in Casper, Wyoming. After being discharged from the Sho-Rap substance abuse program, Appellant failed to return to be transported to Community Alternatives; consequently, he was arrested on September 11, 1992.
The district court revoked Appellant's probation on September 29, 1992, but deferred further disposition of his sentence until "a future date." Appellant was transferred to Community Alternatives on October 9, 1992. The district court gave its permission in December 1992 for Appellant to leave Community Alternatives to attend a second twenty-eight-day alcoholism treatment program at the Thunder Child Treatment Center. Appellant returned to Community Alternatives after he completed the Thunder Child program.
Appellant was allowed to leave Community Alternatives on March 19, 1993, so that he could attend the funeral of a family member in Arapahoe. While he was gone, he failed to maintain contact with Community Alternatives personnel. The prosecution filed a petition on March 22, 1993, for revocation of Appellant's probation, alleging that Appellant had been arrested on March 21, 1993, (third offense) in Lander for public drunkenness. *244 Appellant admitted the allegations. On April 20, 1993, the district court imposed the sentence for Appellant's first offense.
The district court awarded a credit of 130 days for the presentence confinement toward both the minimum and the maximum terms of Appellant's sentence. The district court stated:
5. The defendant should receive 130 days credit off the minimum and maximum sentences for jail time served to date. The defendant should not receive credit for time in alcohol treatment or at [Community Alternatives of Casper].
Appellant filed a motion for a correction of the order which revoked his probation, claiming that he was entitled to receive additional credits toward his sentence. The district court denied his motion. Appellant claims that the district court erred when it failed to award the correct amount of credit toward his sentence for the time he had spent in the Fremont County jail.
"Our established rule is that, on appeal, we do not set aside a sentence if it is within the legislatively mandated minimum and maximum terms in the absence of a clear abuse of discretion."
A defendant who has been confined prior to being sentenced because of his or her inability to post bail is entitled to receive a credit against the sentence for the amount of his or her presentence confinement. When a sentencing court erroneously fails to award a presentence confinement credit, a later denial of a motion to correct the illegal sentence constitutes an abuse of discretion.
Eustice v. State, 871 P.2d 682, 684 (Wyo. 1994) (quoting Betzle v. State, 847 P.2d 1010, 1024 (Wyo.1993)) (citations omitted).
Appellant's maximum term fell below the five-year maximum sentence which could have been imposed for possession of a deadly weapon with unlawful intent, and his minimum term was less than ninety percent of his maximum term. Van Duser v. State, 796 P.2d 1322, 1325 (Wyo.1990); WYO.STAT. § 7-13-201 (1987); § 6-8-103.
The record shows that Appellant had been jailed for at least 127 days before his sentence was imposed:
 From his arrest on August 28, 1991, until November 22, 1991, when he was transferred to the Thunder Child Treatment Center (87 days);
 From his return to jail on December 20, 1991, until December 30, 1991, when he was released (11 days); and
 From his arrest on September 11, 1992, until October 9, 1992, when he was transferred to Community Alternatives (29 days).
Appellant was entitled to receive a credit of at least 127 days toward his sentence. Renfro v. State, 785 P.2d 491, 498 (Wyo.1990).
Appellant was jailed for two additional periods: from his arrest for his second offense on March 21, 1992, until April 22, 1992, when he was transferred to the Sho-Rap Lodge; and from his arrest for his third offense on March 21, 1993, until April 20, 1993, when his sentence was imposed. A portion of each of these periods may have been attributable to the first offense.
The record does not contain the judgment and sentence which was entered for Appellant's second offense, and the district court in this case did not make any reference concerning the length of that sentence. Appellant would be entitled to receive a credit for any time he spent in jail from the conclusion of his jail term for his second offense until April 22, 1992. Eustice, 871 P.2d at 685-86. The record also does not contain the judgment and sentence which was entered for Appellant's third offense. Appellant would be entitled to receive a credit for any time he spent in jail from the conclusion of his jail term for his third offense until April 20, 1993. Id.
Appellant was entitled to receive a credit toward his sentence in this case of at least 127 days for his presentence confinement in jail. Although the district court awarded a credit of 130 days to Appellant for his presentence confinement in jail, the order did not contain adequate findings of fact which would support that award. W.R.CR.P. 32(c)(2)(E) & (F). We remand this case to *245 the district court for a finding of the precise amount of credit which Appellant was entitled to receive for the time he spent in jail before his sentence was imposed. See Eustice, 871 P.2d at 684-86. See also Griebel v. State, 763 P.2d 475, 478 (Wyo.1988) ("we assume appellants will not be punished for exercising their constitutional right to appeal").
The State contends that, pursuant to W.R.A.P. 2.07(a), we should not review Appellant's claim that he was entitled to receive a credit for the time he spent at Community Alternatives and attending the alcoholism treatment programs. The State claims that Appellant limited his notice of appeal to the scope of his motion to correct the order revoking his probation wherein he only sought an additional credit for the time he spent in jail. We agree that Appellant's motion was limited in scope. Although Appellant properly should have initially raised all his claims in the district court, in the interest of judicial economy, we will consider the claims which he has raised for the first time on appeal. Kahlsdorf v. State, 823 P.2d 1184, 1189 (Wyo.1991).
Appellant claims that the district court erroneously denied him a credit for the three periods of time he spent attending alcoholism treatment programs.
When a probationer spends time at an alcoholism treatment facility as a condition of his probation, he is entitled to receive a credit for that time toward his sentence if a charge of escape from official detention will lie. Craig v. State, 804 P.2d 686, 688 (Wyo. 1991); WYO.STAT. § 6-5-206(a) (1988). WYO. STAT. § 6-5-201(a)(ii) (1988) defines official detention:
(ii) "Official detention" means arrest, detention in a facility for custody of persons under a charge or conviction of crime or alleged or found to be delinquent, detention for extradition or deportation, or detention in any manner and in any place for law enforcement purposes. "Official detention" does not include supervision on probation or parole or constraint incidental to release on bail[.]
Appellant attended his first alcoholism treatment program at the Thunder Child Treatment Center between November 22, 1991, and December 20, 1991, while he was awaiting his trial. The district court's order stated:
Upon completion or notification that the Defendant has failed to complete treatment, Sho-Rap shall return the Defendant to the Fremont County Jail and Defendant's bond will be continued as before until further order of the Court.
IT IS FURTHER ORDERED that the Defendant shall not leave the treatment center except in the custody of the Fremont County Sheriff's Department, and that the Defendant is considered to be in custody while at the program. If the Defendant fails to obey Thunder [Child] rules or leaves the Thunder [Child] Program or facility[,] any sheriff or other peace officer in the State of Wyoming is ordered to take him into custody to be held for transportation back to the Fremont County Jail.
The district court did not send Appellant to the Thunder Child Treatment Center as a condition of probation, parole, or release on bail. Appellant was not subject to "supervision on probation or parole or constraint incidental to release on bail." Section 6-5-201(a)(ii).
The district court's order defined a level of custody which was tantamount to confinement at the Fremont County jail. The order contemplated that the custody would be at the level of official detention. See, e.g., Slaughter v. State, 629 P.2d 481, 482 (Wyo. 1981) ("it would not matter if the escape were actually made from a place other than a building labeled the county jail, so long as the defendant was committed to the custody of the county jail at the time" (citing the predecessor to § 6-5-206(a))). Appellant was entitled to receive a credit of an additional 27 days[1] toward his sentence.
Appellant attended his second alcoholism treatment program at the Sho-Rap Lodge from April 22, 1992, until sometime in *246 late July or early August 1992 while he was on probation. The conditions of Appellant's probation included:
6. You shall immediately enroll in and successfully complete an inpatient drug/alcohol treatment program at the Sho-Rap program at or near Fort Washakie, Wyoming;
7. Should you leave the Sho-Rap program without authority or be terminated before you complete treatment, the Fremont County Sheriff's office shall be notified immediately by the program and any peace officer locating you is hereby authorized and directed to detain you and keep you in jail or other suitable detention facility pending transportation back to the Fremont County Jail;
8. You shall submit to search and seizure of your person, residence or automobile at any time of the day or night when requested by the Department of Probation and Parole or any law enforcement officer[.]
(Emphasis in original.) The conditions for Appellant's release to the Sho-Rap Lodge constituted supervision on probation or parole; therefore, Appellant was not in official detention. Section 6-5-201(a)(ii); see Craig, 804 P.2d at 688. He was not entitled to receive a credit for the time he spent attending the Sho-Rap alcoholism treatment program. See also Kupec v. State, 835 P.2d 359, 364 (Wyo.1992) (home electronic monitoring system as a probation condition constituted probation supervision and was not official detention).
Appellant attended his third alcoholism treatment program back at the Thunder Child Treatment Center, which program continued for twenty-eight days beginning sometime after December 1, 1992, between the time when his probation was revoked and the time when his sentence was imposed. The court's instructions were:
Mr. YellowBear should be permitted to go to the Thunder Child Treatment Center in Sheridan, Wyoming, to be transported by that agency, to attend the 28-day residential treatment program.
Mr. YellowBear should be released only to Community Alternatives of Casper upon the completion of his treatment program at Thunder Child Treatment Center.
The district court's instructions indicated that the degree of Appellant's confinement was intended to be less than that imposed during his first trip to the Thunder Child Treatment Center. We conclude that Appellant was not subject to official detention while he attended his second Thunder Child treatment program. Section 6-5-201(a)(ii); see Craig, 804 P.2d at 688. Appellant was not entitled to receive a credit for the time he spent attending his second Thunder Child treatment program.
Appellant also claims that the district court erred when it refused to give him a credit for the time he spent at Community Alternatives. We agree.
When a probationer is ordered to attend a community correctional program as a condition of his probation, a charge of escape from official detention will lie. Peper v. State, 768 P.2d 26, 29 (Wyo.1989). The probationer is entitled to receive a credit toward his sentence for the time he spent attending the program. Prejean v. State, 794 P.2d 877, 878-79 (Wyo.1990). Appellant was at Community Alternatives from October 9, 1992, until March 19, 1993, except for the time he spent attending his second Thunder Child treatment program. Because Appellant was in official detention while he was at Community Alternatives, he would be entitled to receive a credit toward his sentence of an additional 161 days[2] minus the number of full days he spent attending his second Thunder Child treatment program.
*247 Reversed and remanded with directions that a finding be made as to the amount of time Appellant spent in presentence confinements and that an order be entered awarding a credit for that presentence confinement time against the minimum and the maximum terms of Appellant's sentence.
NOTES
[1]  Appellant was in jail on November 22, 1991, and he returned to jail on December 20, 1991; therefore, the credit for those days was included in the credit calculated for his jail time.
[2]  Appellant was in jail on October 9, 1992; therefore, the credit for that day was included in the credit calculated for his jail time.
