Download the PHP package breadthe/php-simple-calendar without Composer
On this page you can find all versions of the php package breadthe/php-simple-calendar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download breadthe/php-simple-calendar
More information about breadthe/php-simple-calendar
Files in breadthe/php-simple-calendar
Package php-simple-calendar
Short Description Generates a monthly array of dates for displaying in a calendar grid
License MIT
Homepage https://github.com/breadthe/php-simple-calendar
Informations about the package php-simple-calendar
🗓 PHP Simple Calendar
This PHP 7.3+ package generates a 7 x 6 (42) or 7 x 5 (35) element array of the days of the month for the desired date. Each date is an instance of Carbon\Carbon
.
It automatically pads the beginning/end of the month with dates from the previous/next month. It can optionally pad with null
instead.
While it does not include an UI, you may use the generated matrix to build a month-grid calendar in the front-end technology of your choice.
NOTE For now, at least, weeks start with Monday.
Requirements
- PHP 7.3+
Installation
You can install the package via composer:
Usage
Calendar grid generation
Start of previous/next months
The start (first day) of the previous and next months is a convenience that might come in handy when building the "previous month"/"next month" navigation in a calendar UI. These properties will exist even if padWithNull()
is called.
UI Example
Here's an example of a simple calendar UI that can be built with this package.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- breadthe
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Laravel/PHP Package Boilerplate
This package was generated using the Laravel Package Boilerplate.