Thank you notes should be sent as soon as possible after a gift or gesture. One week is customary but there a couple of situations where the window is extended. If you receive a gift while in the hospital, obviously thank you notes can wait to be written until you (or the patient) are feeling better. Another exception is wedding thank you notes. Couples generally have up to three months to send thank you notes for gifts they've received.
For my part, I believe the sooner the better when it comes to sending out notes. However, waiting too long does not excuse you from sending a note at all. Despite all of these guidelines, better late than never most definitely applies to thank you notes.