mardi 14 mai 2019

need to get when open and when close if close then when open in next possible day

This a store system. The open and close JSON is

$stores_open_starts="{\"monday\":\"13:00\",\"tuesday\":false,\"wednesday\":\"15:00\",\"thursday\":false,\"friday\":false,\"saturday\":\"17:00\",\"sunday\":\"18:00\"}";
$stores_open_ends="{\"monday\":\"21:40\",\"tuesday\":false,\"wednesday\":\"15:00\",\"thursday\":false,\"friday\":false",\"saturday\":\"15:00\",\"sunday\":\"15:00\"}";

I want get only one output if today is monday and time is 11:00 AM then it show open at 1:00 PM. And show if time is less than equal to 60 min it return open in 60 mins. And as same to close time. if today is tuesday then it will return Next open at 3:00 PM, Wednesday.

it's too much complex.

Aucun commentaire:

Enregistrer un commentaire