Download the PHP package natilosir/jalali without Composer

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

Jalali Date Converter

This library helps you convert dates between the Gregorian (Miladi) and Jalali (Persian) calendars in PHP. Below are some examples of how to use the library.

Install

Alternatively, you can clone the repository directly:

Use

Example Usage

  1. Set the Timezone to Tehran
    You can set the timezone to Tehran (UTC+3.5) using the Timezone method.

  2. Convert Timestamp to Jalali Date
    Convert a Unix timestamp to a Jalali date using the toj method.

  3. Modify the Jalali Date
    You can modify a Jalali date by adding hours, days, months, or years using the addH, addD, addM, and addY methods.

  4. Format the Date in Persian
    Use the format method to display the date in Persian format.

  5. Convert Jalali Date to Timestamp
    You can convert a Jalali date string to a Unix timestamp using the tot method.

  6. Convert Jalali Date to Gregorian
    Use the miladi method to convert a Jalali date to its Gregorian counterpart.

Supported Placeholders

Placeholder Description Example
y Last two digits of the Jalali year 03
Y Full Jalali year 1403
m Numeric representation of the Jalali month 09
M Name of the Jalali month (in Persian) آذر
d Numeric representation of the Jalali day 25
D Day suffix (in Persian) بیست‌و‌پنجم
W Day of the week (in Persian) یک‌شنبه
h Hour in 12-hour format 06
H Hour in 24-hour format 18
i Minutes 33
s Seconds 36

Example Usage


Placeholders in Action

Given:

Using the format string 'W D M Y h:i:s', the replacements are:


Code Example

Set the timezone to Tehran

Convert timestamp to Jalali date

Modify the Jalali date

Format the date in Persian

Convert Jalali date to timestamp

Convert Jalali date to Gregorian using the miladi method


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

Loading the files please wait ....