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.
package Formagic\Filter
author Florian Sonnenburg
since 2009 First time introduced

 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).

inherited_from \Formagic_Filter_Interface::filter()

Parameters

$value

string

The string to be filtered.

Returns

stringThe date output string.