Source of file DateFromTimestampFormatter.php
Size: 0,641 Bytes - Last Modified: 2021-12-23T10:25:16+00:00
/var/www/docs.ssmods.com/process/src/code/formatters/DateFromTimestampFormatter.php
1234567891011121314151617181920212223242526272829303132333435 | <?php /** * * * @author <marcus@silverstripe.com.au> * @license BSD License http://www.silverstripe.org/bsd-license */ class FullDateFromTimestampFormatter implements ReportFieldFormatter { public function format($value) { $value = (double) $value; if ($value) { return date('Y-m-d H:i:s', $value); } } public function label() { return "Timestamp to Y-m-d H:i:s"; } } class DateFromTimestampFormatter implements ReportFieldFormatter { public function format($value) { $value = (double) $value; if ($value) { return date('Y-m-d', $value); } } public function label() { return "Timestamp to Y-m-d"; } } |