yohang/CalendR

First weekday on Week iterator

tbleckert opened this issue · 2 comments

Why is the first weekday option only working on the Month iterator? When using getWeek(...) and looping through the dates, it always starts with Monday.When using getMonth(...) I get the expected result, the first day is whatever getFirstWeekday() is.

I know this is a really old issue, but I am seeing the same problem.

Hi,

sorry for the delay,

<?php

foreach ($calendar->getWeek(2015, 52) as $day) {
    echo $day, ' ', $day->format('d-m-Y'), "\n";
}

gives me

Sunday 20-12-2015
Monday 21-12-2015
Tuesday 22-12-2015
Wednesday 23-12-2015
Thursday 24-12-2015
Friday 25-12-2015
Saturday 26-12-2015

wich is good. Aren't you on 1.0 version that does not manage first week days ?