Orthodox Calendar

API

The api supports Cross-Origin Resource Sharing (CORS). Information for any day of the year can be fetched by including the calendar ('gregorian' or 'julian') and date in the url as follows:

/api/<calendar>/<year>/<month>/<day>/
/api/<calendar>/<year>/<month>/

For example:

/api/gregorian/2018/2/20/

Though the month view excludes the text of scriptures and the lives of the saints due to size and performance, you can fetch information for all of February using the following:

/api/gregorian/2018/2/

To get information for today, simply leave off the date as follows:

/api/gregorian/

Set the calendar to 'gregorian' for new calendar and to 'julian' for old calendar usage.

/api/julian/2018/1/7/

The rubrics are based on OCA rubrics. For example:

Legacy API Endpoints

The legacy endpoints (as follows below) using jurisdiction ('oca' or 'rocor') instead of calendar are still supported, but new development should take place using the names of the calendars instead of the jurisdictions.

/api/<jurisdiction>/<year>/<month>/<day>/
/api/<jurisdiction>/<year>/<month>/

Javascript Embedding

Website administrators can use these apis in conjunction with front-end Javascript to embed the daily readings on the sites they maintain. Backend code can also be used, but that beyond the scope of this documentation and is left up to the administrator.

Following are some simple examples of how to fetch the data from the api and incorporate it into a page.

ES6 Example

HTML With jQuery Example

A very simple example of how to fetch and display fasting information using jQuery follows.

React.js Example

You can view the code for the previous version of this site that was built with React.js in the orthocal-client Github repository.