Skip to content

marcandreappel/simple-calendar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple PHP Calendar

Latest Stable Version License Build Status

A very simple, easy to use PHP calendar rendering class.

Requirements

  • php: >= 8.0

Installing

Install the latest version with:

composer require 'marcandreappel/simple-calendar'

Examples

<?php
require '../vendor/autoload.php';

$calendar = new MarcAndreAppel\SimpleCalendar\SimpleCalendar('June 2023');

echo $calendar->render();
<?php
require '../vendor/autoload.php';

$calendar = new MarcAndreAppel\SimpleCalendar\SimpleCalendar();

$calendar->addEvent('Sample Event', 'today', 'tomorrow');

$calendar->setWeekdays(['Sun', 'Mon', 'Tu', 'W', 'Th', 'F', 'Sa']);
$calendar->setWeekOffset('mon');

echo $calendar->render();