I don't need this time associated with any date. In fact, I don't want it associated with a specific date. It's more so associated with a generic day of the week. Monday, Saturday, etc.
For example, your local coffee shop sets their hours for Monday based on the fact that it is a Monday. Not based on it being May 22, 2017 or May 29, 2017, etc.
I could do something like...
"Local Coffee Shoppe":
{
"availability":
{
"monday":
{
"start":
{
"hour": 7,
"minute": 30
},
"end":
{
"hour": 21,
"minute": 0
}
}
}
}
This would mean the Local Coffee Shoppe is open Mondays from 7:30am to 9:00pm.
Is this the best way to achieve this? All times would be stored in UTC for example, with conversion happening client side.
EDIT1: Just realized there is a hole in this approach. It doesn't cover establishments that are open past midnight. To combat this, maybe each day just stores "start" and then "duration"...
"monday":
{
"start":
{
"hour": 7,
"minute": 30
},
"duration":
{
"hour": 13,
"minute": 30
}
}
So it is open for 13 hours and 30 minutes past 7:30am. I.E. 9:00pm.