Download the PHP package picobaz/jalaliflow without Composer

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

JalaliFlow Documentation

JalaliFlow is a powerful Laravel package designed to handle Persian (Jalali) calendar operations with ease. It provides advanced date conversion, holiday management, and event scheduling, seamlessly integrated with Laravel’s ecosystem. With support for Jalali and Gregorian calendars, holiday checking, and automated event scheduling, JalaliFlow is ideal for projects targeting Persian-speaking audiences.

Table of Contents

Features

Requirements

Installation

  1. Install the package via Composer:

  2. Publish the configuration file (optional) to customize holidays:

    This will create a config/jalaliflow.php file.

  3. Publish and run the migration (required for event scheduling):

    This creates the jalali_events table for storing scheduled events.

  4. (Optional) Add the facade to config/app.php (if not auto-registered):

Configuration

The config/jalaliflow.php file allows you to customize the package’s behavior. Default settings include:

Modify these settings to change the date format, locale, timezone, or holiday list.

Usage

Converting Dates

Convert between Gregorian and Jalali calendars using the JalaliFlow facade.

Adding Dates

Add days, weeks, months, or years to a Jalali date, respecting variable month lengths and leap years.

Subtracting Dates

Subtract days, weeks, months, or years from a Jalali date.

Calculating Differences

Calculate the difference between two Jalali dates in days, weeks, months, or years.

Validating Jalali Dates

Check if a Jalali date is valid.

Displaying Relative Jalali Dates

The toRelativeJalali method allows you to convert a Gregorian date to a relative Jalali string, such as "today", "yesterday", or "3 days ago". This is useful for user-friendly date displays in applications like chat or notification systems.

Managing Holidays

JalaliFlow provides powerful methods to manage official and custom holidays in the Jalali calendar. These are perfect for scheduling, reservation systems, or any application needing to track holidays and working days.

Note: The isWorkingDay method considers Fridays as non-working days, as they are the official weekend in Iran. Ensure the date is in Y/m/d format (e.g., 1404/02/24).

Managing Events

Schedule events to run daily, weekly, monthly, or yearly with database persistence.

Eloquent Trait

Use the JalaliDate trait to automatically convert dates in Eloquent models.

Access the jalali_date attribute to get the created_at date in Jalali format:

Managing Hijri (Islamic) Dates

JalaliFlow supports conversion to and from Hijri (Islamic) dates, as well as checking for major Islamic holidays. This is ideal for religious or cultural applications.

Note: Hijri date conversions are approximate due to the simplified algorithm. For precise conversions, consider integrating with an external API. Dates must be in Y/m/d format for Hijri and Jalali, or Y-m-d for Gregorian.

Calculating Working Days Between Dates

JalaliFlow provides a method to calculate the number of working days (excluding holidays and Fridays) between two Jalali dates. This is ideal for payroll systems, project management, or scheduling applications.

Note: Dates must be in Y/m/d format. The method uses isWorkingDay to exclude holidays and Fridays (the official weekend in Iran). Ensure holiday data is up-to-date for accurate results.

Artisan Command

List holidays for a specific Jalali year:

Output:

Advanced Usage

Note: Some advanced features (e.g., Google Calendar integration, dynamic holiday fetching) are planned for future releases and not yet implemented.

Custom Date Formats

Override the default format in your code or configuration:

Contributing

We welcome contributions! To contribute:

  1. Fork the repository at https://github.com/PicoBaz/JalaliFlow.
  2. Create a feature branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m "Add YourFeature").
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a pull request.

Please include tests and update the documentation for new features.

License

JalaliFlow is open-source software licensed under the MIT License.


Support: For questions or issues, create a GitHub issue at https://github.com/PicoBaz/JalaliFlow/issues or contact us at [email protected].


All versions of jalaliflow with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/console Version ^9.0|^10.0|^11.0|^12.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0
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 picobaz/jalaliflow contains the following files

Loading the files please wait ....