1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alex73 [517]
3 years ago
12

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

Computers and Technology
1 answer:
Helen [10]3 years ago
4 0

If $due_date contains a DateTime object, $due_date_diff will contain  

c. a DateInterval object

Explanation:

  • The DateInterval class ¶  represents a date interval.
  • A date interval stores either a fixed amount of time (in years, months, days, hours etc) or a relative time string in the format that DateTime's constructor supports.
  • The diff method is just as easy to use, but provides an extra piece of information: total days. This is important because when using the DateTime object to find a difference, we have a source and destination date, and therefore we can reduce the units of time into larger denominations. However, having the total number of days in between is a valuable piece of information.
  • The PHP DateTime class has three methods that work with a DateInterval object:
  1. add
  2. sub
  3. diff

Properties

  • y  :Number of years.
  • m  :Number of months.
  • d  :Number of days.
  • h  :Number of hours.
  • i  :Number of minutes.
  • s  :Number of seconds.
You might be interested in
Here are the codes for producer and consumer problems.
melomori [17]

Answer:

If a switch happens during counter++ or counter--, we will get a wrong value for the counter.

Explanation:

counter++ counter--

register1 = counter register2 = counter

register1 = register1 + 1 register2 = register2 - 1

counter = register1 counter = register2

Lets consider this example, lets assume that counter=4, this simply means that there are 4 items which are produced already. Lets look at the following steps and value of counter after each step.

a) Producer process is updating counter++, this takes place at machine level, also, during that when it completed register1=counter counter=4

b) Supposing we have a context switch happen to consumer process and it is trying to update counter--, this takes place at machine level, also when it completed

register2=counter counter=4

register2=register2-1

counter=register2 counter=3

c) Lets assume that context switch happened back to producer process and it continues from where it stopped, look at step a

register1=register1+1

counter=register1 counter=5

This will make the value of counter variable to become 5. Consumption of one item is not reflected in the counter variable. To avoid this we need to allow the atomic execution of all these instructions. This implies completion of any updates on the counter, while others wait for its completion.

d) In the event a producer executes all these machine level instructions at once,then there is no inconsistency on this.

3 0
3 years ago
I will mark brainliest
Angelina_Jolie [31]

Answer:

specialized limitations

Explanation:

beacause the others is an application product

4 0
3 years ago
Helpppppp me please cuz its due rn. put the correct word in the correct spot
tiny-mole [99]

Answer:

Inside air pressure goes on the top in the inside.

Air moves goes into the bottom box.

Outside air pressure goes on the top.

Balloon moves goes on the inside bottom.

6 0
3 years ago
1) What is Database? List its Uses.<br>​
Serggg [28]

Answer:

a database stores a large sum of data

Explanation:

its used to keep track of things like student names bank accounts and other things

7 0
2 years ago
Rule number one for handling an emergency is to _____. A. buy a new vehicle B. call law enforcement C. remain calm D. restart th
KengaRu [80]

Answer:

Remain calm.

Explanation:

Keeping your calm can get you through any emergency situation.  Physical activity stimulates the vagus nerve (a part of the autonomic nervous system) that calms the body down, which is necessary for staying calm when under pressure. During a stressful situation, negative thoughts only work toward increasing your stress level and that is not good for your body or helpful in making effective decisions. This can help you feel like you are in control of the situation and ultimately face the emergency situation better.

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is the key benefit of using RAM in a computer?
    12·1 answer
  • Which mistakes are NOT highlighted by the spell checker in a word-processing document?
    15·2 answers
  • Adding a ____ to text adds depth and helps the letters display prominently.
    5·1 answer
  • • Two advertisers A and B
    8·1 answer
  • When public relations professionals make provocative statements in newsgroups to get people to visit an organization's website o
    10·1 answer
  • Write a program with a method computeCommission which takes a double that is the salesAmount and returns the commissions for sal
    9·1 answer
  • Someone plz answer
    8·1 answer
  • Which descriptions offer examples of Correction Services workers? Select all that apply.
    8·1 answer
  • What is a cloud in the world of computing
    7·1 answer
  • What do we call the software which programmers use to program?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!