Better handling of log message dates

Old-style (pre-2.6) log messages do not record the year.  This pull request adds logic to guess the year based on the weekday and date recorded in the log message.  Also, this pull request addresses various other small bugs around date handling.