Euclidean affine functions and their application to calendar algorithms. (3rd December 2022)