Download the PHP package geoffreyrose/useful-dates-us-holidays without Composer

On this page you can find all versions of the php package geoffreyrose/useful-dates-us-holidays. 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 useful-dates-us-holidays

[![Latest Stable Version](https://img.shields.io/packagist/v/geoffreyrose/useful-dates-us-holidays?style=flat-square)](https://packagist.org/packages/geoffreyrose/useful-dates-us-holidays) [![Test Status](https://img.shields.io/github/actions/workflow/status/geoffreyrose/useful-dates-us-holidays/tests.yml?branch=main&style=flat-square&label=tests)](https://github.com/geoffreyrose/useful-dates-us-holidays/actions?query=branch%3Amain) [![Code Coverage](https://img.shields.io/codecov/c/gh/geoffreyrose/useful-dates-us-holidays/main?style=flat-square)](https://app.codecov.io/gh/geoffreyrose/useful-dates-us-holidays/branch/main) [![License](https://img.shields.io/github/license/geoffreyrose/useful-dates-us-holidays?style=flat-square)](https://github.com/geoffreyrose/useful-dates-us-holidays/blob/main/LICENSE)

US Holidays Extension For Useful Dates

Adds 42 US holidays to use with Useful Dates.

This is the next evolution of geoffreyrose/us-holidays but for my date package Useful Dates.

Requirements

Supported Holidays

Optionally, you can also include the "observed" holidays.

Observed Holidays are when the Federal Holiday falls on a Saturday it is observed on the previous day (Friday) or when it falls on a Sunday it is observed on the next day (Monday).

Usage

Installation

Basic Usage

To include observed holidays, use the include_observed option.

Additional Methods

This extension adds two helper methods to check if a date is a bank or federal holiday:

isBankHoliday(): bool

Check if the current date is a Bank Holiday and the day it is observed on.

Bank Holiday Rules:

Returns:

Example:

isFederalHoliday(): bool

Check if the current date is a Federal Holiday and the day it is observed on.

Federal Holiday Rules:

Returns:

Example:

Getting Holiday Information

You can retrieve holiday information for specific dates:

Or get all holidays for a year:

Holiday Properties

Each holiday object includes the following properties:

Example:

Development

Linting

Static Analysis

Testing


All versions of useful-dates-us-holidays with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
geoffreyrose/useful-dates Version ^1.1
ext-calendar Version *
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 geoffreyrose/useful-dates-us-holidays contains the following files

Loading the files please wait ...