Download the PHP package kindy/hijridate without Composer

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

Kindy Hijri Date Package

This PHP package provides functionalities for handling Hijri (Islamic) dates, including conversion, formatting, and integration with Gregorian calendars. The package features enhanced modularity and functionality, making it highly useful for PHP developers requiring Hijri date processing.

Features

Installation

You can install the package via Composer:

Namespace and Class Structure

The package follows a modular approach with the following structure:

Usage

Basic Example: Display Current Hijri Date

HijriDateTime Class

Constructor

Format Hijri Dates

Format Hijri Dates

Hijri Dates Static Method

Hijri Dates objet by new instance

Hijri and Gregorian Dates Together

Convert Specific Gregorian Date to Hijri

Create Hijri Date Object from Hijri Date

Formatting Time and Date in the Hijri Calendar

The function formats time and date using specific characters, with no differences in parameters but varying outputs depending on the characters used. Below is a table explaining the functionality of each character:

Character Description Example Output
_j Day without leading zeros 1-30
_d Day with leading zeros 01-30
S Ordinal suffix (English only, new in version 2.3) st-nd-th
_z Day of the year (starting from zero) 0-354
_M, _F Month name محرم, صفر, ...
_m Month number with leading zeros 01-12
_n Month number without leading zeros 1-12
_t Number of days in the month 29-30
_L Leap year indicator (1 = Leap Year, 0 = Not Leap Year) 1 or 0
_Y Full year number 1436
_y Two-digit year 36

Adjusted Gregorian Date Formatting in Arabic Language

When selecting the Arabic language, some Gregorian date formatting characters are adjusted as follows:

Character Description Example Output
l, D Day of the week name السبت, الأحد...
F Month names in Syriac terms كانون الثاني, شباط...
M Month names in English terms يناير, فبراير...
a AM/PM in Arabic symbols ص-م
A AM/PM in Arabic full text صباحا - مساء

Extended Features

Additional Methods

The HijriDateTime class includes custom methods for Hijri-specific functionalities:

Calendar Class

The Calendar class provides low-level utilities such as:

Example: Days in Hijri Month

Using the Package with Legacy Code

If you want to use this library without changing existing DateTime-dependent code, alias HijriDateTime as DateTime:

Alternatively, create a custom hdate() function to replace PHP's date():

Contributing

Your contribution is welcome

Credits

License

This package is licensed under GPL-2 License.


Note: For detailed documentation and examples, refer to the official API or the examples.php file in the repository.


All versions of hijridate 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 kindy/hijridate contains the following files

Loading the files please wait ....