Skip to content

Instantly share code, notes, and snippets.

View ArtemProkopenko's full-sized avatar

Artem Prokopenko ArtemProkopenko

  • Russia, Kaliningrad
View GitHub Profile
@ArtemProkopenko
ArtemProkopenko / CronSchedule.php
Created December 21, 2015 10:13 — forked from m4tthumphrey/CronSchedule.php
CronSchedule.php - Allows one to parse a cron expression into human readable text.
<?php
/*
* Plugin: StreamlineFoundation
*
* Class: Schedule
*
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back
* and forth between scheduled moments in time and translating the created schedule back to a human readable form.
*
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format.