Code execution will stop whenever a DateTime object is feed into TBS, whether the field is formatted or not.
include( 'tbs_class.php' );
$TBS = new clsTinyButStrong();
$TBS->Source = 'Today is [datetime;frm=yyyy-mm-dd]';
$TBS->MergeField( 'datetime', new DateTime() );
$TBS->Show(); |
I discovered this while working on a project with MS SQL (php_sqlsrv) which returns datetime fields as a core PHP DateTime object.
Although in my case it is possible to move the formatting back to the query, it'd be nice if it can be done on the presentation layer instead.
Is it sensible to request for support of datetime object, at least for date formatted fields?