Is there an easy way to display open or closed based on time of day?
So, I am making an application that is listing multiple businesses. I am wanting to have a label that displays open or closed for each individual business. Could anyone give me guidance on how to make this possible? I am hoping to store the function within a model, so that it can be stored with the rest of the business information. Thanks!
Hey Stefan,
So my advice with storing this stuff in the model is only to do it if you'll need it for queries. I think that'll be important (filtering by businesses that are open) so it makes sense to be there. Do you have a data format for saving the hours the places are open? Will they always be a consistently open chunk of time like 9-5? I imagine days and weekends will have different hours too. Do you need to handle that as well?