Criminal Procedure (Scotland) Act 1995 (as prospectively amended) P ART 3 B AIL ... 22A Consideration of bail on first appearance (1) On the first occasion on which— (a) a person accused on petition is brought before the sheriff prior to committal until liberated in due course of law; or (b) a person charged on complaint with an offence is brought before a judge having jurisdiction to try the offence, the sheriff or, as the case may be, the judge shall, after giving that person and the prosecutor an opportunity to be heard, either admit or refuse to admit that person to bail. (1A) Before determining whether to admit or refuse to admit the person accused or charged to bail, the sheriff or judge must also give an officer of a local authority an opportunity to provide (orally or in writing) information relevant to that determination. (2) Admittance to or refusal of bail shall be determined before the end of the day (not being a Saturday or Sunday, or a court holiday...