PHPackages                             ishworkh/navigable-date - 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. ishworkh/navigable-date

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

ishworkh/navigable-date
=======================

Wrapper around php DateTime class

v3.0.0(9y ago)0631MITPHPPHP &gt;=7.0

Since Dec 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ishworkh/php-navigable-date)[ Packagist](https://packagist.org/packages/ishworkh/navigable-date)[ RSS](/packages/ishworkh-navigable-date/feed)WikiDiscussions master Synced 3w ago

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

(PHP) NavigableDate
===================

[](#php-navigabledate)

NavigableDate is a wrapper around core php `DateTime` class. It encapsulates core class and exposes `NavigableDateInterface` that provides ways to navigate through a date. It exposes methods like nextDay, nextWeek, previousDay, nextMonth etc, in addition to methods like `format`, `getTimestamp`,`getOffset`, `getDifference` and `getTimezone`.

Basic Usage
-----------

[](#basic-usage)

It can be instantiated with normal new operator but that needs you to manually handle the dependencies (`NavigableDate\NavigableDateLocator` provides all the dependencies required).

Recommended way to get an instance is through `NavigableDateFactory` available also in `NavigableDateLocator`.

```

   $NavigableDate = NavigableDate\NavigableDateLocator::getInstance()
                   ->getNavigableDateFactory()
                   ->create('2016-07-11');

   or

   $NavigableDate = NavigableDate\NavigableDateLocator::getInstance()
                   ->getNavigableDateFactory()
                   ->createFromDateTime(new DateTime());

```

Or even easier `NavigableDate\NavigableDateFacade` is provided for the instantiation.

```
   $NavigableDate = NavigableDate\NavigableDateFacade::create('2016-07-11');
```

It includes `NavigableDate\NavigableDateServiceProvider` to integrate this library to Laravel application. Just include this provider in the lists of service providers. After which type hinting `NavigableDate\NavigableDateFactory` will resolve into respective factory class responsible for creating new instance of `NavigableDate\NavigableDate`

Then,

```
   $NextDay = $NavigableDate->nextDay();

   $NextDay->getTimestamp();
   $NextDay->getOffset();
   $NextDay->getTimeZone();
   $NextDay->format('Y-m-d');

   $NextNextDay = $NextDay->nextDay();
   $NextNextDay->nextMonth();

   $resetTime = true;
   $resetDays = true;
   $resetMonths = true;

   $NextDay->previousYear($resetTime, $resetDays, $resetMonths);

   // $resetTime -> resets time to 00:00:00
   // $resetDays -> resets day of the month to 01 | resets day to start of the week i.e. Monday in case of nextWeek|prevWeek
   // $resetMonths -> resets month of the year to 01

```

Also possible to do previousMonth, nextYear with possibility to reset time, days or months available in corresponding methods.

NOTE: For more details about methods it provides, look into `NavigableDate\NavigableDateInterface`

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

3411d ago

Major Versions

v1.1.0 → v2.0.02017-02-18

v2.0.0 → v3.0.02017-02-25

PHP version history (2 changes)v1.0.0PHP &gt;=5.2.0

v2.0.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3979c17972ec78de21422079dfb3832b9ee5e3301255864ef7a70191526b34c1?d=identicon)[Ishworkh](/maintainers/Ishworkh)

---

Top Contributors

[![ishworkh](https://avatars.githubusercontent.com/u/2223527?v=4)](https://github.com/ishworkh "ishworkh (3 commits)")

---

Tags

laraveldatetimedatewrappernavigablenextDaypreviousDaynextMonthpreviousMonthnextYearpreviousYear

### Embed Badge

![Health badge](/badges/ishworkh-navigable-date/health.svg)

```
[![Health](https://phpackages.com/badges/ishworkh-navigable-date/health.svg)](https://phpackages.com/packages/ishworkh-navigable-date)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[hekmatinasser/verta

This Package helps developers to work with Jalali Datetime class for Laravel Framework PHP

657541.4k28](/packages/hekmatinasser-verta)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[aloko/nova-persian-datepicker

Persian Datepicker for Laravel Nova.

203.6k](/packages/aloko-nova-persian-datepicker)[p3ym4n/jdate

Date converter from Jalali to Georgian and vice versa. It has Carbon instance inside and it's Laravel friendly.

101.8k2](/packages/p3ym4n-jdate)

PHPackages © 2026

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