axi / mycalendar
Calculate several special dates relative to a birthdate (or any date)
2.1.0
2025-02-10 22:31 UTC
Requires
- php: >=8.1
- ext-intl: *
- symfony/finder: ^7.1
- symfony/http-foundation: ^7.1
- symfony/translation: ^7.1
- symfony/yaml: ^7.1
Requires (Dev)
- eluceo/ical: ^2.14
- friendsofphp/php-cs-fixer: ^3
- phpunit/phpunit: ^11.5
- symfony/debug: ^4.4
Suggests
- eluceo/ical: Required to use the Ical (ical) renderering format
README
This library allows you to get information about special dates based on one person's birthday (or any date).
It's been know to be the best tool to wish a happy 15000th day to people (no it's not).
Installation
You can install this package by using Composer, running the following command:
composer require axi/mycalendar
Usage
Basic usage
<?php use Axi\MyCalendar\Service\CalendarService; require_once './vendor/autoload.php'; echo (new CalendarService()) ->getEventsFromDate( dateTime: new DateTime("1984-01-12"), format: 'json' )->getContent();
Available formats
- json
- ical (require "eluceo/ical")
- none (Internal Event object)
Available recipes
Several recipes are already available
- AverageAgeFirstChildren: Women's mean age at 1st childbirth in 2022 in the OECD
- Now: Special recipe to dispaly the current day within the date list
- PlanetsRevolutions: list the dates where planets (other than earth) have made one or several revolutions
- SleepTime: Estimated average sleep total time in years
- ThousandsDays: Fancy dates where people reach multiple of thousand days
See Issues for a list of propositions for more recipes
Translations
Feel free to submit new translations
Contributing
Feel free to submit new Renderers or Recipes
Licence
This library is released under the GPL-3.0-or-later licence.