SproutCMS

This is the code documentation for the SproutCMS project

class ColModifierDate

Converts a MySQL date into something friendlier. Works for DATE, TIME, DATETIME AND [BIG]INT.

The default output format is d/m/Y, but can be changed in the constructor.
Format strings are anything supported by the PHP function date().

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2024-04-26
**/
class NewClassName extends ColModifierDate {
    
    public function __construct (string $format) {
        // Method code goes here
    }
    
    /**
    * Modify a column value
    * This value will be html/csv/etc encoded afterwards.
    **/
    public function modify (string $val, string $field_name) {
        // Method code goes here
    }
    
}
?>