meaning %=

I am studying a program, and has “% =” and did not understand the this function.

codigo_relogio_ajustavel.ino (2.9 KB)

and has "% =" and did not understand the this function.

It's a compound operator, like +=. It performs a modulo function, and assigns the result to the variable on the left of the operator.

% is the modulo command. Adding the = causes the result to be applied to the variable on the left of the expression.

See compound expressions

One application is to limit the range of a variable.
example, limit counter from 0-17:

counter++;
counter = counter % 18;   // counter %= 18;

similar to:

counter++;
if( counter > 18 )
{
   counter = 0;
}