2017 © Pedro Peláez
 

yii2-extension yii2-timeago

Yii2 extension for jQuery plugin timeago which makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago") from ISO 8601 formatted dates and times embedded in your HTML (à la microformats).

image

davidhirtz/yii2-timeago

Yii2 extension for jQuery plugin timeago which makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago") from ISO 8601 formatted dates and times embedded in your HTML (à la microformats).

  • Monday, November 27, 2017
  • by davidhirtz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5,463 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

Yii 2 Timeago

Used to display auto-updating, translated relative dates (e.g. "3 minutes ago") HTML tags using a custom web component. For the previous version build on jQuery, use the version v1.2.0 constraint in your composer.json., (*1)

Installation

composer require davidhirtz/yii2-timeago "^2.1"

Usage

Once the extension is installed, simply use it in your view like this:, (*2)

<?= \davidhirtz\yii2\timeago\Timeago::tag(time()); ?>

Or use the column helper class in your \yii\grid\GridView:, (*3)

[
    'attribute' => 'created_at',
    'class' => \davidhirtz\yii2\timeago\TimeAgoColumn::class,
],

The Versions

27/11 2017

dev-master

9999999-dev

Yii2 extension for jQuery plugin timeago which makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago") from ISO 8601 formatted dates and times embedded in your HTML (à la microformats).

  Sources   Download

MIT

The Requires

 

by David Hirtz

yii2 extension time jquery timeago microtime