Fixed the bug for single day using analysisPeriod

Now it is possible to also use analysisPeriod component to simulate a
single day.