New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

sukohi/clock-label

Laravel package to manage clock labels like This Month and so on.
14

Larablocks Analysis

sukohi/clock-label works with Laravel 5 (latest release 2.0.0, Mar 26, 2016), which reached end of life: no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 5, past end of life
  • No release in the last 12 months (last: Mar 26, 2016)
  • 0 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Mar 26, 2016.
  • No releases in the last 12 months.
  • First released: Mar 26, 2016.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.

Install
composer require sukohi/clock-label
Latest Version:2.0.0
Laravel:5
License:MIT
Last Updated:Mar 26, 2016
Links: GitHub  ·  Packagist
Maintainer: Sukohi

ClockLabel

Laravel package to manage clock labels like This Month and so on.
This package used to be called TimeLabel that gave us errors after using composer require command.

Installation

Execute composer command.

composer require sukohi/clock-label:2.*

Set the service provider in app.php

'providers' => [
    ...Others...,  
    Sukohi\ClockLabel\ClockLabelServiceProvider::class,
]

Also alias

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

Usage

$clock_label = ClockLabel::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_clocks = [
    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_clocks as $dt) {

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

        echo $clock_label->get($dt) .'<br>';

    }

    echo $dt .'<hr>';

}

License

This package is licensed under the MIT License. Copyright 2016 Sukohi Kuhoh

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released Laravel License
2.0.0 ~5.0 MIT