PHPackages                             rtablada/calendar - 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. rtablada/calendar

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

rtablada/calendar
=================

76PHP

Since Oct 24Pushed 12y ago1 watchersCompare

[ Source](https://github.com/rtablada/calendar)[ Packagist](https://packagist.org/packages/rtablada/calendar)[ RSS](/packages/rtablada-calendar/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel 4 Calendar
------------------

[](#laravel-4-calendar)

Laravel 4 Calendar helper gives you a few different convenient methods for working with dates and calendars in Laravel 4. At the heart of this is functionality which gets the current date based on the query string parameters `day`, `month`, and `year`.

Using Laravel 4 Calendar
------------------------

[](#using-laravel-4-calendar)

In your `app/config/app.php` configuration file add `Rtablada\Calendar\CalendarServiceProvider` to your service providers and `'Calendar' => 'Rtablada\Calendar\CalendarFacade'`.

Now you can call `Calendar::getDateFromInput()` to get the current date plus any modifications that have been made using user input.

The functions
-------------

[](#the-functions)

### getDateFromInput

[](#getdatefrominput)

This function can take a bunch of different formats to make modifications to what date is used before using the input bag to modify the returned Carbon instance.

When no parameters are passed, this function will use the current system date. A Carbon instance can be passed to the function as the starting date. If an array is passed, you can specify `day`, `month`, and `year` keys if a key is left out, the current system date's value for that key will be used. Otherwise, the parameters can be passed as `getDateFromInput($day, $month, $year)` if any parameters are left out, then the current system date's value for that parameter will be used.

### yearLinks

[](#yearlinks)

This function will return a View object which will have links to pick years.

The `yearLinks` function accepts a few parameters

1. `selectedDate` - This value will be sent to the `getDateFromInput` function to show the current date, in case you want to overwrite the default other than what occurs in the user input.
2. `startYear` - Year to start the links created, if ommitted or null is passed, one year before the computed `selectedDate` is used.
3. `endYear` - Year to end the links created, if ommitted or null is passed, one year after the computed `selectedDate` is used.
4. `options` - See the options parameter section below.

### monthLinks and dayLinks

[](#monthlinks-and-daylinks)

These functions return View objects which will have links to pick either months or days.

These functions accept two parameters

1. `selectedDate` - This value will be sent to the `getDateFromInput` function to show the current date, in case you want to overwrite the default other than what occurs in the user input.
2. `options` - See the options parameter section below.

The Options Parameter
---------------------

[](#the-options-parameter)

The `options` parameter accepts a keyed array to allow you to dictate a few different display options, the keys currently available are:

1. `before_current`
2. `before_selected`
3. `after_current`
4. `after_selected`

If you set the value of a key to `hide`, then those options will be hidden. Otherwise, the value is used as an HTML class applied matched date links.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea9ccd400c74151601341e320935a31d1a9779c5eb49a8f364bc7a0ac75baa32?d=identicon)[rtablada](/maintainers/rtablada)

---

Top Contributors

[![rtablada](https://avatars.githubusercontent.com/u/2532004?v=4)](https://github.com/rtablada "rtablada (21 commits)")

### Embed Badge

![Health badge](/badges/rtablada-calendar/health.svg)

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

###  Alternatives

[99designs/money-php

A library for dealing with money and currency conversion.

1154.7k1](/packages/99designs-money-php)

PHPackages © 2026

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