See if there are laws in your state, as some require you to announce a pregnancy at least 15 weeks before your due date. Otherwise, choose the most appropriate time given your personal dynamics with your boss. Always announce to your boss first!