Simple Clock
Easy
60
3
55.9% Acceptance
In this lab, you will create a React application that dynamically displays the current day, date, and time. Each of these elements should be in separate <div>
elements with specific IDs. You will use JavaScript's Date object to obtain the current day, date, and time.
Specific Requirements
-
Display the Current Day:
- Create a
<div>
with the ID#day
. - This
div
should dynamically display today's day in full text format (e.g., "Monday").
- Create a
-
Display Today's Date:
- Create a
<div>
with the ID#date
. - This
div
should show today's date in the format "DD Month YYYY" (e.g., "14 November 2023").
- Create a
-
Display the Current Time:
- Create a
<div>
with the ID#time
. - This
div
should dynamically display the current time, updating every second, in the format "HH:MM:SS" (24-hour format).
- Create a
Example Output
Your page should display text similar to the following, updating in real-time:
- Day: "Monday"
- Date: "November 14, 2023"
- Time: "15:45:30"
Remember to test your application to ensure it meets all the requirements and updates accurately in real-time.