Given the following Date Time object, which sample will NOT alter the date to the value ‘2014-02-15’?

Given the following Date Time object, which sample will NOT alter the date to the value ‘2014-02-15’?

$date= new DateTime(‘2014-03-15’);
A . $date->sub(new Datelnterval(‘PlM’));
B . $date->setDate(2014, 2, 15);
C . $date->modify(‘-1 month’);
D . $date->diff(new Datelnterval(‘-PlM’));

Answer: D

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments