You are given a date in format "{day}-{month}-{year}"
Calculate and print the day of week in English.
Examples:
Here is the solution:
<?php $input = readline(); $dayOfWeek = new DateTime($input); echo $dayOfWeek->format("l");
Here are all the parameters of the format method of DateTime Class: https://www.php.net/manual/en/function.date.php
622 questions
979 answers
129 comments
53 users