Mecha CMS

Date and time.


Define custom date pattern.
Date::_(string $kin, string $pattern);
Date::_(string $kin, callable $fn);


The _ method of the Date class can accept string value that represent date pattern. This can be used as a way to create a method that simply return a formatted date. Other than that, the results will inherit to Genome::_().

Date::_('en_us', '%~D%, %~M% %D%, %Y%');

$date = new Date('2019-09-18 16:39:48');

echo $date->en_us;