Download the PHP package bahaicalendar/badical without Composer

On this page you can find all versions of the php package bahaicalendar/badical. 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 badical

BadiCalPHP

Library to convert between Gregorian and Badi / Bahai calendars.

Previously at BadiCal but that repo is being split into individual languages in the BahaiCalendar group.

There are currently versions for:

As the Badi date starts at sunset, every conversion has two possibilities. Converting from Gregorian to Badi, you can get either the Badi date before sunset or after sunset for that Gregorian day; the former is the default. Converting from Badi to Gregorian, you can get either the Gregorian date before midnight or after midnight; the default is the latter.

For example, 2015-03-21 (Gregorian) converts to the end of 172-01-01 (Badi: Bahá 1, 172 ie. Naw Ruz) as the default, and optionally to the start of 172-01-02 (Badi). Consequently, 172-01-01 (Badi) converts to the start of 2015-03-21 (Gregorian) as the defauls, and optionally as the end of 2015-03-20 (Gregorian).

The default is always the daytime conversion.

The library uses precalculated NawRuz dates from http://wilmetteinstitute.org/wp-content/uploads/2014/11/Bahai-Dates-172-to-221-B-E-_UK-December-2014.pdf . Please report any errors (see BadiCal.NAWRUZ).

Loading

If not using Composer, you can autoload all classes by requiring the load.php file at the root of this repo.

Usage

The usage is currently extremely simple. There are two static conversion functions which return \BahaiCalendar\BadiCal\Date objects.

Gregorian to Badi

\BahaiCalendar\BadiCal\Convert::GregorianToBadi

Which outputs:

Badi to Gregorian

\BahaiCalendar\BadiCal\Convert::BadiToGregorian

Which outputs:

Date object

The \BahaiCalendar\BadiCal\Date class has the following:

Methods

year($formatted) @param bool formatted - [OPTIONAL, default=false] will pad the output with a zero @return the year

month($formatted) @param bool formatted - [OPTIONAL, default=false] will pad the output with a zero @return the month

monthName() @return the name of the month according to the appropriate calendar

day($formatted) @param bool formatted - [OPTIONAL, default=false] will pad the output with a zero @return the day

Properties

type Either \BahaiCalendar\BadiCal\Date::GREGORIAN ('GREGORIAN') or \BahaiCalendar\BadiCal\Date::BADI ('BADI')

Static Values / Methods

\BahaiCalendar\BadiCal\Date::GREGORIAN: 'GREGORIAN', used for the Date->type

\BahaiCalendar\BadiCal\Date::BADI: 'BADI', used for the Date->type

\BahaiCalendar\BadiCal\Date::BADI_MONTHS: Array with names for Badi Calendar months (zero based). Includes Ayyam-i-Há.

\BahaiCalendar\BadiCal\Convert::getAyyamiha($badi_year): @param badi_year - The year in the Badi calendar @return \BahaiCalendar\BadiCal\Date

Testing

You must have the BadiTest repository to test the library. Simple use test.php to run a test group from BadiTest by specifying the path to the test group file, like:

Which currently results in:


All versions of badical with dependencies

PHP Build Version
Package Version
No informations.
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 bahaicalendar/badical contains the following files

Loading the files please wait ....