I am developing a rails 3.1 app where I need to store opening hours for stores. I want to store opening time, closing time and the day of the week. My first idea is to store a day number where 1 is monday and 7 sunday but is there a better approach which is more suitable when I want to internationalize my application?
If i store the day number, how can I compare it with the day of week today to check if the store is open or not?
Thanks for any help
Sounds like you’re on the right track. To figure out the current day of the week:
Although that considers Sunday 0 and Saturday 6.