You want to find out what day Twelfth Night falls on after Christmas 2018. Which code should you use?

Advertisement

Here is the answer of the question: You want to find out what day Twelfth Night falls on after Christmas 2018. Which code should you use?

  • $xmas = new DateTime(‘Dec 25, 2018’); $twelfth_night = $xmas->add(new DateInterval(‘P12D’)); echo $twelfth_night->format(‘l’);
  • $twelfth_night = strtotime(‘December 25, 2018 + 12 days’); echo date(‘d’, $twelfth_night);
  • $twelfth_night = strtotime(‘December 25, 2018 + 12 days’); echo strftime(‘%d’, $twelfth_night);
  • $xmas = new DateTime(‘Dec 25, 2018′); $twelfth_night = $xmas->add(strtotime(’12 days’)); echo $twelfth_night->format(‘D’);

The above question is related to “LinkedIn PHP Skill Quiz“. You can find all the updated questions and answers related to to “LinkedIn PHP Skill Quiz” on the “LinkedIn PHP Skill Quiz” page. If you find the update in question or answers, do comment on this page and let us know. We will update the answers as soon as possible.

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment

Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend