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

ActiveLibrary

sukohi/time-label
=================

Laravel package to manage time labels like `This Month` and so on.

2.0.1(10y ago)117MITPHP

Since Oct 17Pushed 10y ago1 watchersCompare

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

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

TimeLabel
=========

[](#timelabel)

Laravel package to manage time labels like `This Month` and so on.

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

[](#installation)

Add this package name in composer.json

```
"require": {
  "sukohi/time-label": "2.*"
}

```

Execute composer command.

```
composer update

```

Register the service provider in app.php

```
'providers' => [
    ...Others...,
    Sukohi\TimeLabel\TimeLabelServiceProvider::class,
]

```

Also alias

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

```

Usage
=====

[](#usage)

```
$time_label = TimeLabel::setLabel([
    'today' => 'Today',
    'yesterday' => 'Yesterday',
    'this_month' => 'This Month',
    'last_month' => 'Last Month',
    'other' => 'M, Y'   // You need to set date format only here.
]);
$date_times = [
    Carbon::now(),
    Carbon::now(),
    Carbon::now()->subDay(),
    Carbon::now()->subDay(),
    Carbon::now()->subDays(2),
    Carbon::now()->subDays(4),
    Carbon::now()->subDays(4),
    Carbon::now()->subDays(5),
    Carbon::now()->subDays(10),
    Carbon::now()->subDays(20),
    Carbon::now()->subDays(50),
    Carbon::now()->subDays(150),
];

foreach($date_times as $dt) {

    if($time_label->isFirst($dt)) {

        echo $time_label->get($dt) .'';

    }

    echo $dt .'';

}

```

License
=======

[](#license)

This package is licensed under the MIT License.

Copyright 2015 Sukohi Kuhoh

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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

Total

3

Last Release

3867d ago

### 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-time-label/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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