I want have an restaurant application and i want to improve my functionality. I have the restaurants Open and Close time with NSDate Format. I want to simple check which restaurants is open currently. My app should ask the NSDate() for current time and it should be check the Open and Close time. If current Time <= Close Time & current Time >= Open Time restaurant should be open. If current Time >= Close Time and & currentTime <= Open Time restaurant should be close.
What is the best approach for this situation ? Should I go for If else statements as I told ?
Thank you, and happy coding...
Aucun commentaire:
Enregistrer un commentaire