Moved more of the payperiod caluclation functions into the date helper for bug #8365.