The De Havilland Law is the informal name of California Labor Code Section 2855, a California law which prevents a court from enforcing specific performance of an exclusive personal services contract beyond the term of seven calendar years from the commencement of service.
The section was first enacted as part of the new Labor Code in 1937. It was a recodification of an older statute, Civil Code Section 1980, which had been enacted as part of the original California Civil Code in 1872. The statute had originally provided for a two-year limit on specific enforcement, but was amended in 1931 to seven years.
Hollywood industry lawyers in the 1920s, 1930s, and 1940s took the position that an exclusive personal services contract should be treated as suspended during the periods when the artist was not actually working. Since no artist could be working every single day (that is, including holidays and weekends), this interpretation meant that two, or later, seven years of actual service would be spread over a much longer calendar period, thus extending the time during which the studio system had complete control of a young artist's career.
In response, actress Olivia de Havilland filed a lawsuit on August 23, 1943 against Warner Bros. which was backed by the Screen Actors Guild. The lawsuit resulted in a landmark decision of the California Court of Appeal for the Second District in de Havilland's favor on December 8, 1944. In an unanimous opinion by Justice Clement Lawrence Shinn, the three-justice panel adopted the common sense view that seven years from the commencement of service means seven calendar years. Since de Havilland had started performance under her Warner annual contract on May 5, 1936 (which had been renewed six times pursuant to its terms since then), and seven calendar years had elapsed from that date, the contract was no longer enforceable and she was free to seek projects with other studios.
De Havilland's legal victory reduced the power of the studios and extended greater creative freedom to performers. The decision was one of the most significant and far-reaching legal rulings in Hollywood. The decision came to be informally known, and is still known to this day, as the "de Havilland law". 
While today's film actors have enjoyed the equitable compensation and creative freedom intended by Section 2855, music artists have not.  Jared Leto and Shannon Leto of the band 30 Seconds to Mars credit the de Havilland law with resolving their music contract issue in 2009, which sets a precedent for music artists and Section 2855.