Mecha CMS

Date and time.

Date::()

Define custom date pattern.

2.0.02.2.0staticGenome
Date::_(string $kin, string $pattern);
Date::_(string $kin, callable $fn);

Example:

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;