Download the PHP package phx2600/firstfriday without Composer

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

FirstFriday.php

Latest Stable Version Total Downloads Author License Build Status

Introduction

Convinience library for calculating the first Friday of a month.

Like this project? Keep me caffeinated by making a donation.

Requirements

Install with Composer

Usage

First, import FirstFriday:

Then instantiate the class:

Where $timezone is a String representation of a timezone to be used for date calculations. For example America/Phoenix, Antarctica/Troll or UTC. See http://bit.ly/php-tzs for a full list of available timezones.

Once your class is instantiated you can get the next first Friday of the month via the next() method:

or the previous first Friday via the previous() method:

Both the next() and the previous() methods return an instance of Carbon. This makes date calculations and returning specific date information easy. For example:

Return a pre-formatted date string:

Return a custom formatted string:

Get the time until the next first Friday in human a human readable format:

Cabon also provides a number of convinient comparison functions, for example:

See the Carbon documentation for more details.


You may also override the value used as "today" in the date calculations. This will allow you to make calculations as if today were another day. This can be accomplished by passing an instance of Carbon as the second parameter when instantiating the FirstFriday class:

or fluently:

NOTE: Be sure to set the timezone of the $today parameter to the same timezone passed to the $timezone argument of the FirstFriday class to ensure consistency in date calculations. Failing to do so may cause unexpected results.

Troubleshooting

Please report bugs to the GitHub Issue Tracker.

Copyright

This project is liscensed under the MIT License.


All versions of firstfriday with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
nesbot/carbon Version ^1.22
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 phx2600/firstfriday contains the following files

Loading the files please wait ....