The Mathematics of the ISO 8601 Calendar