Opening Hours - How to build this feature?

How to build this feature wherein opening hours are shown dynamically to the visitor on the website?

Reference Website: https://www.hydeparkdentalcare.com.au

Reference opening hours:

use onditions for widgets

2023-11-02_10-31-04

OR widget Code

<?php
   $day = date('N');
   if ($day == 1) echo 'Open from 8-00 to 11-00';
     //etc ...
   if ($day == 4) echo 'Open from 8-00 to 11-00';
   if ($day == 5) echo 'Open from 10-00 to 11-00';
?>

to style the current day.

add dymanic class to each element of the day

2023-11-02_11-40-09

.
and use css style

.day1-1, .day2-2, .day3-3, .day4-4, .day5-5, .day6-6 {
    background: #ccc;
}

Thanks for the tip, will give it a go, read the docs, and try to build it up, cheers.