PHP code example of gopromotional / event-planner

1. Go to this page and download the library: Download gopromotional/event-planner 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/ */

    

gopromotional / event-planner example snippets


use GoPromotional\EventPlanner\EventPlanner;

EventPlanner::countdown('2026-12-03', '2026-10-19');
// ['eventDate' => '2026-12-03', 'today' => '2026-10-19', 'days' => 45, 'weeks' => 6, 'remainderDays' => 3, 'status' => 'upcoming']

EventPlanner::giveawayQuantity(attendees: 500, days: 2);   // ['base' => 600, 'buffer' => 60, 'total' => 660]
EventPlanner::orderByDate('2026-12-03', today: '2026-10-19'); // ['orderBy' => '2026-11-12', 'workingDays' => 15, ...]

foreach (EventPlanner::timeline('2026-12-03', '2026-10-19') as $row) {
    echo "{$row['due']}  {$row['task']}" . ($row['overdue'] ? ' (overdue)' : '') . PHP_EOL;
}