add getCurrentPeriod method.