Robert Colt Prebble appeals the district court’s order denying him jail time credit. Prebble was held in the McPherson County jail for 231 days pending disposition of his felony case in that district. The issue is whether Prebble should be denied credit for the time he was held in the McPherson County jail because he had a detainer from another district during the time he was held in custody.
On July 14,2005, the Rice County District Court issued a felony arrest warrant for a theft allegedly committed by Prebble on or about July 1, 2005. Although the record is unclear, it also appears Prebble had outstanding warrants at that time from Nickerson and Hutchinson municipal courts.
On August 8, 2005, McPherson police responded to a domestic disturbance call involving Prebble. The police were aware of the Rice County felony warrant at the time they responded to the call. After locating Prebble, the police attempted to arrest him based *328on the Rice County warrant. Prebble did not cooperate, but he was eventually taken into custody, and the arrest warrant was returned to Rice County on that same date.
On August 16,2005, Prebble was charged in McPherson County District Court with obstructing official duty, a felony, and also with battery against a law enforcement officer and simple battery, both misdemeanors, arising from the domestic disturbance and from Prebble’s attempt to resist the arrest. Prebble remained in custody in the McPherson County jail pending his trial. Following a jury trial, Prebble was convicted of all three counts. The record does not reflect that Prebble was ever returned to Rice County to answer the felony theft charge, and his presentence investigation report indicated Prebble had a “detainer or other charges pending” at the time of his sentencing in McPherson County.
On March 27,2006, Prebble was sentenced to a controlling term of 16 months in prison. Prebble requested credit for the 231 days he had spent in the McPherson County jail pending disposition of his case. The district court inquired if Prebble was being held on any other charges, and the prosecutor informed the court about the Rice County detainer. The district court denied Prebble’s request for jail time credit and stated, “[T]he law in Kansas is simply if you’re held under more than one charge from different counties, that it is not to be credited . . . .” Prebble timely appeals.
The only issue is whether the district court erred in denying Prebble credit for the time he was held in the McPherson County jail pending disposition of his case. The issue involves statutory interpretation. The interpretation of a statute is a question of law over which this court has unlimited review, and this court is not bound by the district court’s interpretation. State v. Bryan, 281 Kan. 157, 159, 130 P.3d 85 (2006).
K.S.A. 2006 Supp. 21-4614 addresses jail time credit and provides in relevant part:
“In any criminal action in which the defendant is convicted upon a plea of guilty or no contest or trial by court or jury or upon completion of an appeal, the judge, if the judge sentences the defendant to confinement, shall direct that for the purpose of computing defendant’s sentence and parole eligibility and conditional release dates thereunder, that such sentence is to be computed from a date, to *329be specifically designated by the court in the sentencing order of the journal entry of judgment or the judgment form, whichever is delivered with the defendant to the correctional institution, such date shall be established to reflect and shall be computed as an allowance for the time which the defendant has spent incarcerated pending the disposition of the defendant’s case.”
This statute makes it clear that a defendant in a criminal case is entitled to credit for “the time which the defendant has spent incarcerated pending disposition of the defendant’s case.” Confusion arises, however, when the defendant is incarcerated for more than one case at the same time, especially when the separate cases are pending in more than one district. Both Prebble and the State cite four cases interpreting how K.S.A. 2006 Supp. 21-4614 should be applied when the defendant has separate cases pending in different districts.
In Campbell v. State, 223 Kan. 528, 575 P.2d 524 (1978), the defendant was charged in Reno County with two felonies but was arrested in Barton County on unrelated felony charges. The defendant remained in the Barton County jail until he was sentenced in that case, and at sentencing he received credit for the time spent in jail pending disposition of the case. The defendant was then transported to Reno County where he was convicted of the Reno County charges. At sentencing in Reno County, the defendant requested credit for the time he was held in the Barton County jail and argued that the Reno County charges were pending against him during the time he was held in Barton County. The district court denied the defendant’s request.
On appeal, the court held that 21-4614 requires a sentencing court to give the defendant credit for each day spent in jail solely on account of the offense for which the defendant is being sentenced. However, the defendant is not entitled to credit on a sentence for time which the defendant has spent in jail on other charges. Under the facts of the case, the court reasoned that the time the defendant had spent in the Barton County jail was not solely on account of the Reno County charges for which he was being sentenced. Accordingly, the defendant was not entitled to credit in the Reno County case for the time spent in the Barton County jail. 223 Kan. at 530-31.
*330In State v. Calderon, 233 Kan. 87, 661 P.2d 781 (1983), the defendant abducted an 11-year-old boy in Riley County and drove to a farm located in Pottawatomie County where the defendant sodomized the boy. The defendant was subsequently charged in Riley County with kidnapping and in Pottawatomie County with aggravated criminal sodomy. The defendant was held in the Riley County jail for approximately 3 months pending disposition of the kidnapping charge, and he ultimately pled no contest and was sentenced to prison. The following year, the defendant was returned from the state penitentiary to Pottawatomie County to answer the charge of aggravated criminal sodomy. He was ultimately tried and convicted. At sentencing, the defendant requested credit for the 3 months he had spent in the Riley County jail, but the district court denied the jail time credit.
On appeal, the court held the provisions of 21-4614 are mandatory and require a sentencing court to give the defendant credit for time spent in jail solely on account of the offense for which the defendant is being sentenced. Under the facts of the case, the court reasoned that the defendant had not been held in the Riley County jail solely on account of the Pottawatomie County charge, and therefore the defendant was not entitled to credit in the Pottawatomie County case for the time he had spent in the Riley county jail. 233 Kan. at 97-98.
In State v. Taylor, 24 Kan. App. 2d 80, 941 P.2d 954, rev. denied 262 Kan. 969 (1997), the defendant was charged in Harvey County, Reno County, and Sedgwick County with indecent liberties with a child involving the same child. The defendant was sentenced to prison in the Harvey and Reno County cases and received jail time credit. He was then transferred to Sedgwick County where he pled guilty and received a prison sentence. On appeal from the Sedgwick County sentence, the defendant argued he should receive credit for the time he had served in Harvey and Reno County because the charges were closely related. This court held the time the defendant had spent in jail in other counties could not be applied to the Sedgwick County sentence because the defendant had not been held in the other counties solely on account of the Sedgwick County charge. However, the court went on to state that *331the defendant was entitled to credit in the Reno and Harvey County cases for the time he was incarcerated in those respective jails. The court concluded: “A defendant incarcerated on account of multiple criminal charges filed in separate counties should receive jail time credit only against the sentence for the charges filed in the county in which he or she is held.” 24 Kan. App. 2d 80, Syl. ¶ 2.
Finally, in State v. Hartman, 27 Kan. App. 2d 98, 998 P.2d 128 (2000), the defendant sought jail time credit in two Sedgwick County cases of driving under the influence (DUI) for time he had served in the Cowley County jail on a probation violation in an unrelated case. The DUI charges were pending at the time the defendant was in the Cowley County jail, but the defendant was not transferred to Sedgwick County until he had been released from the Cowley County incarceration. This court denied the defendant’s request for jail time credit in the Sedgwick County cases for the time the defendant had spent in the Cowley County jail. Citing Calderon, this court stated: “Jail time credit is earned under K.S.A. 21-4614 only for time spent in jail solely on the account of the offense for which the defendant is being sentenced.” 27 Kan. App. 2d at 103.
Based upon these cases, the State argues that under Kansas law, the defendant in a criminal case is entitled to jail credit only for time the defendant is held in custody solely on account of the charge for which the defendant is being sentenced. The State points out that during the 231 days Prebble was held in the McPherson County jail, he was also being detained on the Rice County charge. Therefore, according to the State, Prebble should receive no credit for the time he was held in the McPherson County jail pending disposition of his case. The district court adopted this reasoning and refused to grant Prebble any jail time credit.
We disagree. The time Prebble served in the McPherson County jail was solely on account of the charges pending against him in McPherson County. Otherwise, Prebble either would have been released or transported to Rice County to face the charge pending against him there. Under the State’s reasoning, Prebble would never receive credit for the 231 days he was held in the McPherson *332County jail because he had a detainer or warrant pending from more fhan one district at the time he was being held in McPherson County.
Campbell, Calderon, Taylor, and Hartman can all be distinguished from Prebble’s case. In each of these cases, the defendant requested credit at sentencing for time the defendant had served in another jail while the defendant’s case was pending. In each situation, the defendant had already been sentenced in another case and had already received credit in the other case for the same time. In each case, the court denied credit because the defendant had not been held in the other jail solely on account of the charges for which the defendant was being sentenced. Essentially, the court in each case simply denied granting credit at sentencing for jail time the defendant had already received credit for in another case, even though the case for which the defendant was being sentenced was pending at the time tire defendant had been in the other jail.
Here, Prebble only requested credit for the time he was held in the McPherson County jail pending disposition of his case in that district. He did not seek credit for time spent in another county jail while his case was pending. The State is correct that Prebble had a detainer from Rice County during the time he was held in the McPherson County jail. However, the case law cited by the parties does not say that the defendant is denied jail time credit at sentencing simply because the defendant has a detainer or warrant pending from another district, as the State argues here. Such a position would render K.S.A. 2006 Supp. 21-4614 almost meaningless because it is certainly common for a defendant in a criminal case to have a detainer or warrant pending from more than one district at any given time.
The district court in Prebble’s case put the cart before the horse. At some point Prebble will presumably be returned to Rice County to answer the felony theft charge pending in that district. If he is ultimately sentenced and attempts to receive credit in that case for the 231 days he spent in the McPherson County jail, his request should be denied because the time Prebble spent in the McPherson County jail was not solely on account of the Rice County charge. This is what Campbell, Calderon, Taylor, and Hartman *333stand for. However, this does not mean that Prebble is not entitled to receive credit for the 231 days he spent incarcerated in the McPherson County jail pending disposition of his case in that district.
We conclude the district court erred in denying Prebble jail time credit simply because he had a detainer pending from another district at the time of his sentencing. Prebble is entitled to jail time credit for the time he was held in the McPherson County jail pending disposition of his case in that district, but he is not entitled to credit for this time in any other case. This result satisfies the purpose and intent of K.S.A. 2006 Supp. 21-4614. The district court’s order denying Prebble jail time credit is reversed, and the case is remanded to district court with directions to forthwith amend the journal entry of judgment granting Prebble jail time credit of 231 days.
Reversed and remanded with directions.