(a) Definitions. For the purposes of this section, the following words and terms shall have the meanings ascribed to them in this subsection (a):
(1) "Minor" means a person under the age of eighteen years.
(2) "Public place" means those places on which the general public has common ownership or has the right of occupancy or use.
(3) "Places of amusement or entertainment" means those places that are privately owned which are available for occupancy or use by the general public for the purpose of economic benefit to the owner or owners.
(4) "Emergency" means a situation whereby a person's physical integrity is in imminent danger so that assistance is essential.
(b) Minors are prohibited from being upon public places and places of amusement and entertainment from the hours of 11:00 p.m. until 5:00 a.m. of the following day, unless accompanied by a parent, guardian or person in loco parentis, or if upon an emergency errand.
(c) Notwithstanding subsection (b) hereof, minors in attendance at functions sanctioned by the Board of Education of the Ontario public schools, any recognized religious organization or any recognized public service or civic group, shall have thirty minutes from the termination of any such function, or 1:00 a.m., whichever is later, to comply with the express purpose of this section.
(d) Any minor possessing a valid working permit whose employment requires him to be in contravention of the express purpose of this section, shall be granted thirty minutes from the time he leaves his employment to comply with the provisions of this section.
(e) In the event any minor is in violation of this section, such violation is deemed to have occurred with the permission of such minor's parents or guardians, as the case may be.
(f) Whoever violates this section shall be guilty of a misdemeanor of a fourth degree.