yohang/CalendR — pull request #19 by yohang (2013-05-23 12:03:52+00:00)
Title: set first weekday

When calling $factory->setFirstWeekday() depending on current month first day, the class can generate an error.

For example, trying to set first week day as Thursday on May 2013, via:
$factory->setFirstWeekday(4)

generates this:
Fatal error: Uncaught exception 'Exception' with message 'DateInterval::__construct() [dateinterval.--construct]: Unknown or bad format (P-1D)' in ../vendor/yohang/calendr/src/CalendR/Period/Month.php:84