The trial court failed to calculate custody credits when setting the minor’s maximum period of confinement.