Hello, thank you for your query.
Section 73 and 74 of the Indian Penal Code, 1860 defines solitary confinement and limit to solitary confinement.
Section 73 states whenever any person is convicted of an offense for which under this code the Court has the power to sentence him to rigorous imprisonment, the Court may, by its sentence, order that the offender shall be kept in solitary confinement for any portion or portions of the imprisonment to which he is sentenced, not exceeding three months in the whole, according to the following scale, that is to say-a time not exceeding one month if the term of imprisonment shall not exceed six months.
section 74 states that in executing a sentence of solitary confinement, it shall not exceed fourteen days at a time, with intervals between the periods of solitary confinement of not less duration than such periods; and when the imprisonment awarded shall exceed three months, the solitary confinement shall not exceed seven days in any one month of the imprisonment awarded.
Section 465 of the IPC talks about forgery. The punishment of this is imprisonment for 2 years, or fine, or both. This is a non-cognizable, available offense. Magistrate of the first class tries this offense.
Hope this helps you.