Is there a programmable thermostat that allows a totally custom program?

Even though that should be easy, I don’t know of any that have it built in. However, what you could do, is buy two identical t-stats, program one for each schedule and switching the schedules would be as easy as popping one off the wall and putting the other one on. Not exactly an elegant solution, but it would work.

Also, I’d be willing to bet you could replace your t-stat with an arduino and program it to do exactly what you’re looking for.