For the purposes of this chapter, “convicted” or “conviction” includes a finding by a judge of a juvenile court, a juvenile hearing officer, or referee of a juvenile court that a person has committed an offense, and “court” includes a juvenile court except as otherwise specifically provided.