A person who has been convicted of a disorderly persons offense or a petty disorderly persons offense may be sentenced to imprisonment for a definite term which shall be fixed by the court and shall not exceed 6 months in the case of a disorderly persons offense or 30 days in the case of a petty disorderly persons offense.
N.J.S. § 2C:43-8