Double check the stats on when an absence is recorded.
My kid's school records after 1:30, but seemed to have that overlooked on this last perfect attendance.
Of course, court dates are usually in the middle of the day! See if you can have it rescheduled.