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 14:30
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
question
Computers and Technology, 22.06.2019 18:10
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
You know the right answer?
$current_date = new DateTime();

$due_days_diff = $current_date->diff($due_date);< br...
Questions
question
Mathematics, 13.11.2020 17:00
question
English, 13.11.2020 17:00
question
Mathematics, 13.11.2020 17:00
Questions on the website: 13722362