This should be acceptable like other time data as you are not trying to add the exact schedule.
The simplest is to come up with something specific with your country. There are a lot of `school:*=` the most being `school:FR=` from France, however this is for school categories.
`opening_hours=` should not be used. The school can still be "open" during after school and semester breaks. `service_times=` should be more suitable. So a possible hierarchy is something like `service_times:ref:CO=` for your `=A` and `=B`.
The more general option is to try to list out the school term.
term.
A: `service_times=Jan-Jun,Jul-Nov; SH closed`
B: `service_times=Sep-Dec,Jan-Jun; SH closed`
If you have more precise ranges, you may try ISO year-week. Eg:
A: `service_times=Week 4-24,28-48; SH closed`
B: `service_times=Week 31-50,3-26; SH closed`
You can add both your country's community-decided tag and `service_times=` to show both the actual periods and the national designation for the system.