Proper weekend handling, improved logic, and changed export location.