Mecha CMS

Date and time.

$date->__call()

Call a date pattern directly.

2.0.02.2.0
$date->__call(string $kin, array $lot = []);

Example:

Date::_('foo', '%Y%/%M%/%D% %h%:%m% %N%');

$date = new Date('2019-06-25 16:01:19');

$A = $date->M;
$B = $date->{'~M'};
$C = $date->foo;
$D = $date->bar;

Result:

$A = '06';
$B = 'June';
$C = '2019/06/25 04:01 PM';
$D = void;

Call a date pattern directly if available or try to execute pre-defined date pattern defined by $genome::_(). Default to $genome->__call().