Download the PHP package zaki/laravel-working-calendar without Composer

On this page you can find all versions of the php package zaki/laravel-working-calendar. 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 laravel-working-calendar

Laravel Working Calendar

zaki/laravel-working-calendar detects public holidays and country-specific weekends, then calculates previous, next, and offset working days.

Features

Requirements

Country coverage

The package architecture accepts every valid ISO 3166-1 alpha-2 country code. Actual holiday data depends on the configured providers:

  1. Nager.Date is the default online provider.
  2. Yasumi is an optional offline fallback for the countries it supports.
  3. Custom application holidays can correct or extend provider data.
  4. A custom provider can be added for countries or official sources not covered by the bundled providers.

The package throws an exception when every provider fails. It does not silently interpret provider failure as “there are no holidays.”

Installation

After the package is published on Packagist:

Laravel discovers the service provider and facade automatically. Publish the configuration when overrides are needed:

For the optional Yasumi offline fallback:

Local package development

Add a path repository to the Laravel application's composer.json:

Then run:

Basic usage

Inspect a specific date:

Example response shape:

Direct checks

nearestWorkingDays() returns:

Regional holidays

Pass an ISO 3166-2 subdivision code when the selected provider contains regional data:

Artisan command

Regional example:

Configuration

Weekend overrides

ISO-8601 weekday numbers are used: Monday is 1 and Sunday is 7.

Forced working and non-working dates

Precedence is:

  1. Forced working date.
  2. Forced non-working date.
  3. Public holiday.
  4. Weekend.

Custom holidays

Regional custom holiday:

Dependency injection

Adding another provider

Create a class implementing HolidayProvider:

Place it first in the provider chain:

Production guidance

Holiday rules can change, governments can announce one-off closures, and some religious holidays depend on official declarations. Configure overrides for urgent corrections and use the most authoritative provider available for the country.

For payment, settlement, payroll, or compliance systems, store the country, subdivision, holiday source, calculation date, and resulting working date in an audit log.

Development

composer check validates composer.json, lints all PHP files, and runs the test suite. GitHub Actions runs these checks on PHP 8.2, 8.3, 8.4, and 8.5.

Release instructions are in RELEASING.md.

Security

See SECURITY.md.

License

MIT. See LICENSE.


All versions of laravel-working-calendar with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/cache Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/config Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/console Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/contracts Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
nesbot/carbon Version ^2.72 || ^3.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 zaki/laravel-working-calendar contains the following files

Loading the files please wait ...