PHPackages                             campusunion/sked - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. campusunion/sked

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

campusunion/sked
================

Open source PHP calendar library

v0.0.26(9y ago)0631MITPHPPHP &gt;=7.0

Since Mar 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/CampusUnion/Sked)[ Packagist](https://packagist.org/packages/campusunion/sked)[ Docs](http://github.com/CampusUnion/Sked)[ RSS](/packages/campusunion-sked/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (27)Used By (1)

Sked
====

[](#sked)

Open source PHP Calendar library.

Installation &amp; Setup
------------------------

[](#installation--setup)

First, run the SQL create statements on your database:

```
sql/create.sked_events.sql
sql/create.sked_event_members.sql
sql/create.sked_event_tags.sql

```

Then, instantiate Sked in your code with data connection credentials:

```
$sked = new \CampusUnion\Sked([
    'data_connection' => [
        'name' => 'PDO',
        'options' => [
            'driver' => 'mysql',
            'host' => 'localhost',
            'dbname' => 'homestead',
            'user' => 'homestead',
            'pass' => 'secret',
        ],
    ],
]);
```

Basic usage
-----------

[](#basic-usage)

### Event form

[](#event-form)

```
echo $sked->form();
```

### Saving events to the database

[](#saving-events-to-the-database)

```
$sked->save(new SkeVent($_POST));
```

Build a custom calendar by iterating through a specified date range:

```
foreach ($sked->skeDates('2016-08-05', '2016-09-21')) {
    // do something awesome
}
```

The SkeDate Object
------------------

[](#the-skedate-object)

A `SkeDate` object is useful for populating a particular date in your calendar UI.

Print the date using the `format()` method, which accepts a formatting string as an optional parameter (see [formatting options](http://php.net/manual/en/function.date.php#refsect1-function.date-parameters)for PHP's `date` function):

```
echo $skeDate->format('j'); // default format is 'Y-m-d' (e.g., 2016-08-05)
```

Then you can iterate through its events:

```
foreach ($skeDate->skeVents(/* Optionally pass a user ID to get events for a certain user. */)) {
    // do something awesome
}
```

The SkeVent Object
------------------

[](#the-skevent-object)

A `SkeVent` object allows for easy access and manipulation of an event.

Retrieve any database field (see SQL queries) as a property:

```
echo $skeVent->label;
```

Print the event time using the `time()` method, which accepts a formatting string as an optional parameter (see [formatting options](http://php.net/manual/en/function.date.php#refsect1-function.date-parameters)for PHP's `date` function):

```
echo $skeVent->time('Hi'); // default format is 'g:ia' (e.g., 2:15pm)
```

`SkeVent::time()` accepts a second optional parameter for timezone adjustment. To adjust the event's time to a particular timezone, just pass in the timezone offset integer:

```
echo $skeVent->time(null, -5); // outputs the time adjusted for US Eastern Standard time
```

Basic-er Usage
--------------

[](#basic-er-usage)

For an instant, non-customized event form, use the magical `skeDoosh()` method. The only required configuration is connection parameters for your data store. Call `skeDoosh()` from the exact spot in your code where you want the HTML form to be displayed:

```
Sked::skeDoosh([
    'data_connector' => [
        'name' => 'PDO',
        'options' => [
            'driver' => 'mysql',
            'host' => 'localhost',
            'dbname' => 'homestead',
            'user' => 'homestead',
            'pass' => 'secret',
        ],
    ],
]);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Recently: every ~19 days

Total

26

Last Release

3526d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1744373?v=4)[Mark Potter](/maintainers/mopo922)[@mopo922](https://github.com/mopo922)

### Embed Badge

![Health badge](/badges/campusunion-sked/health.svg)

```
[![Health](https://phpackages.com/badges/campusunion-sked/health.svg)](https://phpackages.com/packages/campusunion-sked)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

630113.0M40.4k](/packages/illuminate-support)[spatie/holidays

Calculate public holidays

402860.1k2](/packages/spatie-holidays)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k30](/packages/craftcms-feed-me)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k17](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

46855.5k5](/packages/pimcore-data-importer)[flarum/core

Delightfully simple forum software.

251.4M2.2k](/packages/flarum-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
