the rules for this are insanely complicated and practically require automation to keep track of if you have more than a small handful of crew members.
https://www.ecfr.gov/current/title-14/chapter-I/subchapter-G...