Download the PHP package cmixin/enhanced-period without Composer

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

enhanced-period

Carbon mixin to convert Carbon\CarbonPeriod to Spatie\Period\Period and vice versa.

Latest Stable Version Tests Code Climate Test Coverage Issue Count StyleCI

Professionally supported nesbot/carbon is now available

Install

Usage

Both output (using the default Carbon\CarbonPeriod cast to string):

See all methods you can call on Spatie\Period\Period objects.

And here are the methods you can call directly on CarbonPeriod instances:

length

overlapsWith

You can pass to overlapsWith: Spatie\Period\Period, CarbonPeriod, DatePeriod or arguments to construct a CarbonPeriod.

Note: ->overlapsWith will give different results from ->overlaps because it use internally Spatie\Period\Period and its precision mask (use floor rounding).

touchesWith

You can pass to overlapsWith: Spatie\Period\Period, CarbonPeriod, DatePeriod or arguments to construct a CarbonPeriod.

Note: ->touchesWith will give different results from ->isConsecutiveWith because it use internally Spatie\Period\Period and its precision mask (use floor rounding).

duration

Warning: this method requires spatie/period >= 2.0

Get a representation of the iteration duration.

overlap

Warning: does not match spatie/period 1 overlap() method because of upcoming renaming, it's for now called overlapSingle in spatie/period.

Return overlap period between current and a given other period.

overlapAny

Warning: due to upcoming renaming, it's for now called overlap in spatie/period.

Return overlap chunks that are present in at least 2 periods.

overlapAll

Return the merged overlap of all periods.

diffAny

Warning: due to upcoming renaming, it's for now called diffSingle in spatie/period.

Returns the difference between the current period and an other given one.

diff

Returns periods in the current ones that are not covered by periods passed as arguments.

gap

Returns the gap period between the current one and the one passed as argument.

fromEnhancedPeriod

Convert a Spatie period into a Carbon period, you can pass true as a second argument to select Carbon as date class rather than CarbonImmutable (by default).

fromNullableEnhancedPeriod

Same as fromEnhancedPeriod but allow null value.

fromPeriodCollection

Convert PeriodCollection object into an array of CarbonPeriod instances.

You can pass true as a second argument to select Carbon as date class rather than CarbonImmutable (by default).

convertDateIntervalToPrecision

Convert DateInterval objects (such as CarbonInterval) into a Spatie precision mask if it exists, throws an RuntimeException if it does not match any mask.

convertDateIntervalToPrecision

Convert Spatie precision mask into a CarbonInterval.


All versions of enhanced-period with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
nesbot/carbon Version ^2.23.0-beta.1 || ^3.0@dev || ^4.0@dev
spatie/period Version ^1.4.3 || ^2.0.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 cmixin/enhanced-period contains the following files

Loading the files please wait ....