move day of week function code to the only place it is used
Merge pull request #498 from Trott/eliminate-day-stuff-from-base

move day of week function code to the only place it is used