PHPackages                             sukohi/julius - 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. sukohi/julius

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

sukohi/julius
=============

A PHP package mainly developed for Laravel to manage calendar and events.

2.0.4(10y ago)815.9k↓95.2%8[1 issues](https://github.com/SUKOHI/Julius/issues)MITPHP

Since Jul 8Pushed 10y ago3 watchersCompare

[ Source](https://github.com/SUKOHI/Julius)[ Packagist](https://packagist.org/packages/sukohi/julius)[ RSS](/packages/sukohi-julius/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Julius
======

[](#julius)

A PHP package mainly developed for Laravel to manage calendar and events.
(This package was inspired by [laravel-calendar ](https://github.com/makzumi/laravel-calendar)).
Thank you makzumi!
(This is for Laravel 5+. [For Laravel 4.2](https://github.com/SUKOHI/Julius/tree/1.0))

**[Demo](http://demo-laravel52.capilano-fw.com/julius?mode=month)**

[![Imgur](https://camo.githubusercontent.com/84f0c372f9ff8594c8dfd226b7493462ed32a1255c1cf2d1e9fca8314f66f47e/687474703a2f2f692e696d6775722e636f6d2f4a386f3566324e2e706e67)](https://camo.githubusercontent.com/84f0c372f9ff8594c8dfd226b7493462ed32a1255c1cf2d1e9fca8314f66f47e/687474703a2f2f692e696d6775722e636f6d2f4a386f3566324e2e706e67)

Installation
============

[](#installation)

Add this package name in composer.json

```
"require": {
  "sukohi/julius": "2.*"
}

```

Execute composer command.

```
composer update

```

Register the service provider in app.php

```
'providers' => [
    ...Others...,
    Sukohi\Julius\JuliusServiceProvider::class,
]

```

Also alias

```
'aliases' => [
    ...Others...,
    'Julius'   => Sukohi\Julius\Facades\Julius::class
]

```

Usage
=====

[](#usage)

**Minimal Way**

```
echo \Julius::make();

```

**with Options**

See [Methods](#methods) for the details.

```
$events = [
    date('Y-m') .'-11 10:15:00' => ['Event 1', 'Event 2'],
    date('Y-m') .'-09 10:26:00' => ['Event 3', 'Event 4'],
    date('Y-m') .'-07 14:12:23' => ['Event 5'],
    date('Y-m') .'-15 12:39:00' => ['Event 6'],
    date('Y-m') .'-17 25:50:00' => ['Event 7'], // You can use times over 24:00
];

$julius = \Julius::make();

$julius->setStartDate(\Request::get('base_date'))	//Set base date
	->showNavigation(true)	// Show or hide the navigation
	->showDayOfWeek(true)	// Show or hide the day of week for "week" or "day" mode.
	->setMode(\Request::get('mode'))	// month, week or day
	->setHours('8:10', '18:20')	// Set the hour range for day and week mode. And you can use times over 24:00
	->setClasses([	// Set classes
			'table' => 'table table-bordered',
			'header' => 'table-header',
			'time' => 'time',
			'prev' => 'btn',
			'next' => 'btn',
			'day_label' => 'text-success', // You can use array like ['0' => 'sunday-class', '6' => 'saturday-class']
			'today' => 'text-danger',
			'year_month' => 'text-center',
			'day' => 'text-muted', // You can use array like ['0' => 'sunday-class', '6' => 'saturday-class']
	])
	->setWraps([	// Set wrapers
			'event' => ['', ''],
			'day' => ['', ''],
			'date' => ['', '']
	])
	->setIcons([	// Set navigation icons (You can use HTML tags)
			'prev' => ' Prev',
			'next' => 'Next '
	])
	->setNavigationJsFunction('your_function_name')    // When using this method, the navigation icon link has onclick event. e.g) onclick="your_function_name(date)".
	->setDayLabels(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'])	// Set week day names
	->setMonthLabels(['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'])	// Set month names
	->setInterval('+10 minutes')	// e.g.) +3 hours, +30 minutes etc...
	->setEvents($events, $callback = function($events, $start_dt, $end_dt){	// Set events and its callback function(Callback is optional)

		$html = ''. $start_dt->day .'';
		$html .=  ''. print_r($events, true) .'';
		$html .= ''. print_r($start_dt, true) .'';
		$html .= ''. print_r($end_dt, true) .'';
		return $html;

	})
	->setDateFormats([  // Set date formats
         'year_month' => 'm Y',
         'day' => 'w j',
         'time' => 'H:i'
     ]);
echo $julius->generate();

```

Methods
==========================================

[](#methods)

**showNavigation($bool)**

Show or hide the navigation

**showDayOfWeek($bool)**

Show or hide the day of week for `week` or `day` mode.

**setMode($str)**

To set calendar type. $str can be month, week or day.

**setHours($start, $end)**

To set the hour range for `day` and `week` mode.
You need to set time format like `00:00`, `10:25` for $start and $end.
You can set times over 24:00

**setClasses($array)**

To set class values like the below.

```
setClasses([
	'table' => 'table table-bordered',
	'header' => 'table-header',
	'time' => 'time',
	'prev' => 'btn',
	'next' => 'btn',
	'day_label' => 'text-success', // You also can set array like ['0' => 'sunday-class', '6' => 'saturday-class']
	'today' => 'text-danger',
	'year_month' => 'text-center',
	'day' => 'text-muted', // You also can set array like ['0' => 'sunday-class', '6' => 'saturday-class']
])

```

**setWraps($array)**

To set wrapers.

```
setWraps([
	'event' => ['', ''],
	'day' => ['', ''],
	'date' => ['', '']
])

```

**setIcons($array)**

To set navigation icons. (You can use HTML tags)

```
setIcons([
	'prev' => ' Prev',
	'next' => 'Next '
])

```

**setNavigationJsFunction($js\_function\_name)**

When using this method, the navigation icon link has onclick event like the below.

```
onclick="js_function_name('2015-09')"

```

**setDayLabels($array)**

To set week day names

```
setDayLabels(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'])

```

**setMonthLabels($array)**

To set month names.

```
setMonthLabels([
	'January',
	'February',
	'March',
	'April',
	'May',
	'June',
	'July',
	'August',
	'September',
	'October',
	'November',
	'December'
])

```

**setInterval($str)**

To set time step. $str can be +3 hours, +30 minutes etc...

**setEvents($events, $closure)**

To set events and its callback(closure)

```
setEvents($events, function($event, $start_dt, $end_dt){

	// Here you can make content for a specific event.
	return $start_dt->day .' - '. $start_dt .' - '. $end_dt;

})

// $start_dt and $end_dt are Carbon object.

```

**setDateFormats($array)**

To set date formats.
See [here](http://php.net/manual/en/function.date.php) for other date symbols.

```
setDateFormats([
	'year_month' => 'm Y',
	'day' => 'w j',
	'time' => 'H:i'
])

```

License
=======

[](#license)

This package is licensed under the MIT License.

Copyright 2015 Sukohi Kuhoh

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~48 days

Recently: every ~63 days

Total

7

Last Release

3669d ago

Major Versions

1.0.0 → 2.0.12015-08-12

1.0.x-dev → 2.0.32016-04-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/2980d59b309d45df3f2e6e51b1d336614da063240b8f76f873f287cd745ec5db?d=identicon)[Sukohi](/maintainers/Sukohi)

---

Top Contributors

[![SUKOHI](https://avatars.githubusercontent.com/u/5362394?v=4)](https://github.com/SUKOHI "SUKOHI (1 commits)")

### Embed Badge

![Health badge](/badges/sukohi-julius/health.svg)

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

###  Alternatives

[tightenco/ziggy

Use your Laravel named routes in JavaScript.

4.3k41.6M267](/packages/tightenco-ziggy)[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)

PHPackages © 2026

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