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-09-18 17:15:31');

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

Result:

$A = '09';
$B = 'September';
$C = '2019/09/18 05:15 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().