API call for Yesterday should work on Jan 1

Contains fixes for #2906 and some whitespace cleanup. Also includes a unit test 'fix' for the hardcoded years in the HTML Year Dropdown test. I've #2907 to address this.