New Age type, hopefully should simplify that stuff

Could more reasonably be called DayPeriod or something.
Joda is maybe too picky about dates to be useful.
Some messing about; considering a major change
Made DB "global", removed from site; improved SQL interface