commentar/date-format

Date formatter to be used in templates to render a DateTime object as a simple formatted string

v0.0.1 2013-09-07 00:50 UTC

This package is auto-updated.

Last update: 2024-04-06 07:54:18 UTC


README

Build Status Scrutinizer Quality Score Code Coverage Latest Stable Version Total Downloads

Simple date renderer for the Commentar project. This date formatter formats DateTime objects used in comments. Examples of these dates are "date posted" and "post updated" timestamps.

Installation

Add the formatter to the project's composer.json file:

"require": {
    "commentar/date-format": "0.0.*",
}

Use it in your templates:

<?php echo $this->renderView('DateFormat', ['timestamp' => $comment['updated']]); ?>