# dates.day-of-week ISO numbering, 1 = Monday to 7 = Sunday. The alternatives are all off by something: JavaScript's getDay() is 0 = Sunday, Python's weekday() is 0 = Monday and isoweekday() is 1 = Monday. Fixing one convention across the three languages is the point, and it makes a weekend test read as day >= 6 everywhere. It depends on dates.add-days rather than re-deriving days-from-civil: the calendar kernel has one home in the registry, so a fix to it is a fix everywhere. The day number comes from the epoch day, not from a table, so it is correct for dates before 1970 (where the day number is negative) as well as after. Getting the sign right matters: a plain remainder in Rust or TypeScript keeps the sign of the dividend and would return a negative weekday for 1900 dates, so both use a floored remainder. It says nothing about public holidays. Working days are dates.business-days-between, which takes the holiday list as an argument because no library knows your company's.