1. Go to this page and download the library: Download antnavdev/recurrence library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
antnavdev / recurrence example snippets
use AntNavDev\Recurrence\Recurrence;
use Carbon\Carbon;
$recurrence = new Recurrence('weekly:mon,wed,fri');
$recurrence->isDueOn(Carbon::parse('2026-04-13')); // Monday → true
$recurrence->isDueOn(Carbon::parse('2026-04-14')); // Tuesday → false
$recurrence = new Recurrence('biweekly:mon', anchorDate: Carbon::parse('2025-01-06'));
$recurrence->isDueOn(Carbon::parse('2025-01-06')); // week 0 → true
$recurrence->isDueOn(Carbon::parse('2025-01-13')); // week 1 → false
$recurrence->isDueOn(Carbon::parse('2025-01-20')); // week 2 → true
$recurrence = new Recurrence('interval:7', anchorDate: Carbon::parse('2025-01-01'));
$recurrence->isDueOn(Carbon::parse('2025-01-01')); // day 0 → true
$recurrence->isDueOn(Carbon::parse('2025-01-08')); // day 7 → true
$recurrence->isDueOn(Carbon::parse('2025-01-09')); // day 8 → false
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.