Converts the given string into human readable time format.

The following input formats are supported: - integer: $value is interpreted as Unix timestamp - (string)YYYY-MM-DD | YYYY-MM-DD HH:MM:SS: Date is converted into Unix timestamp If $value cannot be converted into Unix timestamp, 'n/a' is returned instead.

category Formagic
package Filter
author Florian Sonnenburg
copyright Copyright (c) 2009 Florian Sonnenburg
version $Id: Date.php 169 2012-05-06 20:16:16Z meweasle $

 Methods

Converts $value into human readable time format and returns the result.

filter(string $value) : string

By default the time format used is strftime(%x %X).

Parameters

$value

string

The string to be filtered.

Returns

stringThe date output string.