[Petter Reinholdtsen] > + start_day = *nl_langinfo(_NL_TIME_FIRST_WEEKDAY) - 1 ; The cal source in util-linux uses this notation to extract the week day: (int)nl_langinfo(_NL_TIME_FIRST_WEEKDAY)[0] It might be a better alternative.