PHPackages                             liturgical-calendar/anniversarycalculator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. liturgical-calendar/anniversarycalculator

ActiveLibrary[API Development](/categories/api)

liturgical-calendar/anniversarycalculator
=========================================

an API that calculates anniversaries of liturgical recurrences from the General Roman Calendar

v1.0.0(1y ago)24[1 issues](https://github.com/Liturgical-Calendar/LitCalAnniversaryCalculator/issues)MITPHPPHP &gt;=7.4

Since Nov 5Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/Liturgical-Calendar/LitCalAnniversaryCalculator)[ Packagist](https://packagist.org/packages/liturgical-calendar/anniversarycalculator)[ Fund](https://paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HDS7XQKGFHJ58)[ GitHub Sponsors](https://github.com/bibleget-i-o)[ RSS](/packages/liturgical-calendar-anniversarycalculator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

LitCal Anniversary Calculator
=============================

[](#litcal-anniversary-calculator)

Similarly to the [Liturgical Calendar Project](https://github.com/JohnRDOrazio/LiturgicalCalendar "https://github.com/JohnRDOrazio/LiturgicalCalendar") and to the [BibleGet Project](https://github.com/BibleGet-I-O/endpoint "https://github.com/BibleGet-I-O/endpoint"), this project is designed as an API. The API calculates data from a data file and produces a response in a data exchange format such as JSON.

Then any kind of data visualization frontend interface can be created to interact with the API and display the data. An example of this can be found at [opera-romana-pellegrinaggi/litcal-anniversari-frontend](https://github.com/opera-romana-pellegrinaggi/litcal-anniversari-frontend "https://github.com/opera-romana-pellegrinaggi/litcal-anniversari-frontend").

The API takes the following parameters:

- **`YEAR`**: the year for which anniversaries will be calculated. For example, if Saint Ignatius was canonized in 1622, and the value `2022` is supplied to the **`YEAR`** parameter, then a `CENTENARY` anniversary of 400 years will be returned.
- **`LOCALE`**: the language in which strings should be translated / localized.

Installation
------------

[](#installation)

### Composer *(recommended)*

[](#composer-recommended)

In your project directory issue `composer require liturgical-calendar/anniversarycalculator`. The package will be installed to the `vendor` folder and the requirement added to your `composer.json`.

### Git

[](#git)

You can also clone the repository to your project folder (useful mostly for development of the API and contributing to the codebase):

```
git clone https://github.com/Liturgical-Calendar/LitCalAnniversaryCalculator.git .
composer install
```

This will clone the repository into the current folder rather than to a folder with the same name as the repository, and then install the package for inclusion in your scripts.

A sample `index.php` script is included.

Usage
-----

[](#usage)

If you installed the package via git, you should already have a sample `index.php` file.

If you installed the package via composer, create a script similar to the following:

```
// index.php
