PHP code example of carvefx / calendar

1. Go to this page and download the library: Download carvefx/calendar library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

carvefx / calendar example snippets




use Carvefx\Calendar\Calendar;

$calendar = new Calendar(2014, 8);

foreach($calendar->getWeeks() as $week) {
  foreach($week->getDays() as $day) {
    $day->toDateString(); // 2014-07-27
    $day->isBlankDay(); // true
  }
}

$first_day = new Day(2014, 07, 01);
$week = new Week($first_day); // constructor