How many days is a middle school child allowed to be absent from school?

about 20 days max but in high school its max 7 or 8