subject

$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.');

}

Questions:

1-. (Refer to code example 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

2. (Refer to code example ) If $due_date contains a DateTime object for a date that comes 1 month and 7 days before the date stored in the $current_date variable, what will $overdue_message contain when this code finishes executing:

a.

0 years, 1 months, and 7 days overdue.

b.

-0 years, -1 months, and -7 days overdue.

c.

1 month and 7 days overdue.

d.

$overdue_message won’t be set because the if clause won’t be executed

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
What is a costume plot? why is it important to a film or theater production?
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
question
Computers and Technology, 22.06.2019 20:40
Write a program that begins by reading in a series of positive integers on a single line of input and then computes and prints the product of those integers. integers are accepted and multiplied until the user enters an integer less than 1. this final number is not part of the product. then, the program prints the product. if the first entered number is negative or 0, the program must print “bad input.” and terminate immediately. next, the program determines and prints the prime factorization of the product, listing the factors in increasing order. if a prime number is not a factor of the product, then it
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
You know the right answer?
$current_date = new DateTime();

$due_days_diff = $current_date->diff($due_date);< br...
Questions
question
Mathematics, 22.09.2019 14:50
Questions on the website: 13722367