Are these individual classes really necessary? The main thing here seems to be the string format... I'd actually prefer anyways to keep the string format the same for all of them and just use one that includes all the way down to seconds (d, m, y, h, m, s). That way if people switch back and fourth among log intervals, they don't have to change their tools that are reading logs.