marcandreappel/simple-calendar

A light, easy to use calendar rendering library

1.1.0 2022-10-11 08:21 UTC

This package is auto-updated.

Last update: 2024-11-11 12:37:02 UTC


README

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();