kill(all)$

/* month and day driven by a single parameter */
/* couldn't get this to work with array functions */

M:[31, 29, 31,
   30, 31, 30,
   31, 31, 30,
   31, 30, 31];

U[0]:[             0,         0];
U[1]:[     U[0][2]+1, U[0][2]+M[1]+0];
U[2]:[     U[1][2]+1, U[1][2]+M[2]+1];
U[3]:[     U[2][2]+1, U[2][2]+M[3]+1];
U[4]:[     U[3][2]+1, U[3][2]+M[4]+1];