Download the PHP package benhall14/php-calendar without Composer

On this page you can find all versions of the php package benhall14/php-calendar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-calendar

PHP Calendar

A PHP class that makes generating calendars as easy as possible.

You can use the addEvent() or addEvents() methods to mark events on the generated calendar.

This is fully compatible with PHP 5 through to PHP 8.1+

Installation via Composer

You can now install this class via composer.

$ composer require benhall14/php-calendar

Remember to add the composer autoloader before using the class and use the correct namespace.

require 'vendor/autoload.php';

use benhall14\phpCalendar\Calendar as Calendar;

Usage

Please make sure you have added the required classes.

Styling

You can apply styles in one of three ways:

1) Using $calendar->stylesheet() after you have initialised a calendar;

2) Using the calendar.css (or calendar.min.css) from the css directory;

3) Create your own stylesheet and add it to the head of your HTML document.

Draw a 'Month View' calendar

In its simplest form, use the following to create a calendar for current month. This will use all defaults (English, Week starting on Sunday, including stylesheet, printing to the page).

Or, you can break it down with full customisability:

Draw a 'Week View' calendar

Instead of a 'month view' calendar, you can now render as a 'week view'. To do this, simply use ->useWeekView(). Remember, when adding events to a week-view calendar, you need to include the time too (see events above).

You can change the start/end times of the day, along with the time interval by using the ->setTimeFormat method:

Monday Start Date

You can now change the weekly start date from a Sunday to a Monday. To activate this, simple use the useMondayStartingDate() method before you 'draw'.

Translated Calendars

We now ship with both English and Spanish translations, with more coming soon. Alternatively, you can add your own custom string translations for both the days and months using the following:

``

If you want to help with translations, use the code in the useSpanish() method as a guide, and open a pull-request.

Credits

Requirements

PHP DateTime

License

Copyright (c) 2016-2022 Benjamin Hall, [email protected] https://conobe.co.uk

Licensed under the MIT license

Donate?

If you find this project helpful or useful in any way, please consider getting me a cup of coffee - It's really appreciated :)

Donate


All versions of php-calendar with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
nesbot/carbon Version 2.*|3.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package benhall14/php-calendar contains the following files

Loading the files please wait ....