Computers and Technology

To create a DateTime object that represents a due date that's 90 days after the current date, you use the following code:

a. $days = new DateInterval('P90D');
$due_date = date();

$due_date = $due_date->add($days);

b. $days = new DateInterval('P90D');
$due_date = new DateTime();

$due_date = $due_date->add($days);

c. $days = new DateInterval('P90D');
$due_date = date();

$due_date = $due_date + $days;

d. $days = new DateInterval('P90D');
$due_date = new DateTime();

$due_date = $due_date + $days;
b. $days = new DateInterval('P90D');
$due_date = new DateTime();

$current_date = new DateTime();

$due_days_diff = $current_date->diff($due_date);< br />
if ($current_date > $due_date) {

$overdue_message = $due_days_diff->format(

'%y years, %m months, and %d days overdue.');

}
14. (Refer to code example 10-1) If $due_date contains a DateTime object, $due_date_diff will contain

a. a TimeStamp object
b. a DateTime object
c. a DateInterval object
d. a TimeInterval object

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:00, abbygriffin2009
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
image
Computers and Technology, 23.06.2019 12:30, legend101xD
Animations and transitions are added from the
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, med69
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a. an advanced knowledge of physics and math b. an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
image
Computers and Technology, 23.06.2019 18:00, taiyana74
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
Do you know the correct answer?
To create a DateTime object that represents a due date that's 90 days after the current date, you us...

Questions in other subjects: