Dates can also be created by the usage of an array. This is a simple and easy way. The used array keys are:
day: day of the date as number
month: month of the date as number
year: full year of the date
hour: hour of the date
minute: minute of the date
second: second of the date
Example 171. Date Creation by Array
Normally you will give a complete date array for creation of a new date instance. But when you do not give all values, the not given array values are zeroed. This means that if f.e. no hour is given the hour 0 is used.
<?php
$datearray = array('year' => 2006,
'month' => 4,
'day' => 18,
'hour' => 12,
'minute' => 3,
'second' => 10);
$date = new Zend_Date($datearray);
<?php
$datearray = array('year' => 2006, 'month' => 4, 'day' => 18);
$date = new Zend_Date($datearray);




