It depends on a patient's medical history and the specific surgery. There are various general rules of thumb saying to stop aspirin five days, a week, or even ten days before a surgery. However, for at-risk patients, where the risk of thrombosis might be higher than the risk of surgical complications. In some cases, doctors advise patients to take aspirin up to the night before surgery.
In short, the specific guideline for each surgery is best advised by the doctor doing the surgery. Any patient taking an aspiring regimen on advice of a cardiologist should also consult that individual as well.