Frustraing class
mikemix opened this issue · 3 comments
mikemix commented
I went through your "documentation". Your examples lack of parenthesis so I get parse errors, and on top of that, I get fatal errors as well:
Fatal error: Call to undefined method CalendR\Period\Month::containsPeriod()
yohang commented
Can you give me example of bad doc ? containsPeriod()
is a method of Event
mikemix commented
Display a month calendar and style the “out of month” days
<?php $month = $factory->getMonth(2012, 01) ?>
<table>
<?php // Iterate over your month and get weeks ?>
<?php foreach ($month as $week): ?>
<tr>
<?php // Iterate over your month and get days ?>
<?php foreach ($week as $day): ?>
<?php //Check days that are out of your month ?>
<td<?php if (!$month->containsPeriod($day) echo ' class="out-of-month"' ?>>
<?php echo $day ?>
</td>
<?php endforeach ?>
</tr>
<?php endforeach ?>
</table>
yohang commented
I fixed this issue in doc.
If you see others mistakes like that, you can fork and edit the documentation, i'll accept your pull requests with pleasure.