sprintf in PeriodAbstract::__construct is missing an argument and thus breaks if $firstWeekday is out of bounds. Additionally, the message implies that 6 == Friday which isn't true. It should be:
sprintf('"%s" is not a valid day. Days are between 0 (Sunday) and 6 (Saturday)', $firstWeekday)
sprintf in PeriodAbstract::__construct is missing an argument and thus breaks if $firstWeekday is out of bounds. Additionally, the message implies that 6 == Friday which isn't true. It should be: