Seinfeld fans may recall an episode in which Jerry and his pals had a bet on who could be "master of his domain" - in other words, refrain from masturbation - the longest. A similar premise preoccupies this risquΓ© comedy from Michael Lehmann, in which teen heart-throb Josh Hartnett trades "Pearl Harbor" and "Black Hawk Down" for an altogether different kind of battle.
Josh plays Matt, a San Francisco website designer so upset at being dumped by girlfriend Nicole (Shaw) he gives up sex for Lent. Hardly surprisingly his buddies think he won't last the distance, taking bets on the length of his abstinence and resorting to various underhand measures to make him succumb.
To make matters worse Matt meets the perfect girl (Sossamon) in, of all places, his local laundrette. How can he win her heart when they can't even go to first base? And what will happen when she finds out about his bizarre resolution?
Classicists will recognise the plot from Lysistrata, in which the women of Greece went on sex strike to force their men to give up war. Lehmann packs his farce with endless innuendo and absurdly erect phalluses, not least when Matt's sex-starved boss (Dunne) is accidentally slipped Viagra.
In places "40 Days" is actually quite witty but one can't help feeling that both Hartnett and Lehmann - yet to repeat the success of his debut feature, the brilliant teen satire "Heathers" - deserve better than this.