Make PeriodData class work for months and weeks