(a) A person, at any time during his or her period of military service or within sixty (60) days after discharge or termination, may apply to a court for relief in respect of any obligation or liability incurred by the person before his or her period of military service.
(b) The court, after appropriate notice and hearing, unless in its opinion the ability of the applicant to comply with the terms of the obligation or liability has not been materially affected by reason of his or her military service, may grant the following relief:
(1) In the case of an obligation payable under its terms in installments under a contract for the purchase of real estate or secured by a mortgage or other instrument in the nature of a mortgage upon real estate, a stay of the enforcement of the obligation during the applicant's period of military service, and from the date of termination of the period of military service or from the date of application if made after termination of military service, for a period equal to the period of the remaining life of the installment contract or other instrument plus a period of time equal to the period of military service of the applicant, or any part of the combined period, subject to payment of the balance of principal and accumulated interest due and unpaid at the date of termination of the period of military service or from the date of application, in equal installments during the combined period at the rate of interest on the unpaid balance as is prescribed in the contract, or other instrument evidencing the obligation, for installments paid when due, and subject to any other terms as the court may consider just; or
(2) In the case of any other obligation or liability, a stay of the enforcement during the applicant's period of military service, and from the date of termination of the period of military service or from the date of application, if made after termination of the period of military service, for a period of time equal to the period of military service of the applicant or any part of that period, subject to payment of the balance of principal and accumulated interest due and unpaid at the date of termination of the period of military service or the date of application, in equal periodic installments during the extended period at the rate of interest prescribed for the obligation or liability if paid when due, and subject to other terms the court considers to be reasonable and just.
(c) When any court has granted a stay as provided in this section, a fine or penalty may not be accrued for failure to comply with the terms or conditions of the obligation or liability for which the stay was granted during the period with which the terms and conditions of the stay are complied.