Depends on your comfort level. Earlier if you need to take it easier at work like carry heavy stuff, stand long hours. Consider also if your employer need to find a replacement for you
I told my boss once i have confirmed my pregnancy. Only told my boss boss when i had no choice because of some issues.