Download the PHP package ecommit/frequency-generator without Composer
On this page you can find all versions of the php package ecommit/frequency-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package frequency-generator
Frequency generator
Get the next date (DateTime object) by frequency.
Installation
To install frequency-generator with Composer just run :
Usage
Create generator
Frequency "every day"
Arguments :
- array $times Times (Array of DateTime or DateTimeImmutable objects). Default: only 00:00:00
Frequency "every week"
Arguments :
- array $days Array of days in week (integers). (1=Monday => 7=Sunday). Default: Only 1 (monday)
- array $times Times (Array of DateTime or DateTimeImmutable objects). Default: only 00:00:00
Frequency "every month"
Arguments :
- array $days Array of days in month (integers). (1=>31). Default: Only 1 (1st)
- array $times Times (Array of DateTime or DateTimeImmutable objects). Default: only 00:00:00
Frequency "every quart"
Arguments :
- array $monthOffsets Array of month offsets in quart (integers). (1 = January, April, July, October. 2 = February, May, August, November. 3 = March, June, September, December). Default: Only 1 (January, April, July, October)
- array $daysInMonth Array of days in month (integers). (1=>31). Default: Only 1 (1st)
- array $times Times (Array of DateTime or DateTimeImmutable objects). Default: only 00:00:00
Frequency "every half year"
- array $monthOffsets Array of month offsets in half year (integers). 1 = January, July. 2 = February, August. 3 = March, September. 4 = April, October. 5 = May , November. 6 = June, December). Default: Only 1 (January, July)
- array $daysInMonth Array of days in month (integers). (1=>31). Default: Only 1 (1st)
- array $times Times (Array of DateTime or DateTimeImmutable objects). Default: only 00:00:00
Frequency "every year"
- array $monthOffsets Array of month offsets in year (integers). (1 = January => 12 => December). Default: Only 1 (January)
- array $daysInMonth Array of days in month (integers). (1=>31). Default: Only 1 (1st)
- array $times Times (Array of DateTime or DateTimeImmutable objects). Default: only 00:00:00
Generate DateTimeImmutable objects
The generator generates by default DateTime objects.
The generator can generate DateTimeImmutable objets with generateDateTimeImmutable
method:
License
This librairy is under the MIT license. See the complete license in LICENSE file.
All versions of frequency-generator with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4|^8.0
The package ecommit/frequency-generator contains the following files
Loading the files please wait ....