Season 4: Episode 21 - The Three Day's Rule

The Three Day's Rule: Ted meets a new girl, Holly, and the gang insists that he wait three days before calling to ask her out. Ted reluctantly agrees, but decides that texting her before then is fine, and he strikes up a text conversation with Holly that lasts several days. However, he soon discovers that he is actually texting with Marshall and Barney, who had swapped Holly's number in Ted's phone for Barney's to keep him from calling her before the three days was up. Furious after discovering the truth, Ted goes ahead and calls Holly to ask her out, and discovers that the three day rule is more apt then he once suspected.