updated the functions with openinghours based on pure php