what is the earliest I can upgrade a contract with a new phone
You can upgrade at any time by paying full retail price for a phone. If you're wanting to purchase a new phone via a subsidized two-year contract, I've read that you can upgrade seven days before your actual upgrade date.