extract methods: sameStartEndBudgetPeriod and overlapStartEndBudgetPeriod from getAmount(date,date).