Section 22. Every minor described in the preceding section shall, subject to the laws relating to the public schools, attend said schools or courses in the town of his employment for not less than four hours per week; but the attendance of minors who have been required to attend continuation schools, and are temporarily out of employment or business, shall be for not less than twenty hours per week, if said schools or courses are so long in session. Instruction in the regular schools may and upon application of the parent or guardian shall be accepted as equivalent to that required by this section and section twenty-five.