==> Tell us what you are trying to do?
Due to complexity of the project, I was forced to think how to save fields and queries by creation of the sort of 'universal' 'Timetable'.
A) Basically it should to cover 3 different time usage (from part of Types point of view).
- Separate hours and minutes (ie of usage - Transportation departure - 'static' by nature)
- 'Dead' times ('static', with exclusive purpose to display data)
- 'Normal' time ('dynamic', with purpose to show actual time)
As above is pointed, first two types are by nature 'static' with no other purpose than to only shows inserted values in frontend.
Third type have purpose to display 'real time' (ie - Opening Hours).
All of them should to be mixed as they use some of the same fields and same conditional logic (what should to increase performances). Example, days in the week, Open/Close (as 'static' data), holidays, ... In other words, they visually complicate view of 'post construction', but they will not affect the question of topic. However, explanation was necessary.
Construction of Types is done and it works well.
B) There are 3 different types of 'Timetable' hours.
- Horario habitual ('normal' known 'opening hours' per days in week)
- Horario para todos los días ('normal' known 'opening hours', but equal for all days in week)
- 'Special Timateble' ('normal' known 'opening hours' per basically, holidays)
PROBLEM
How to set it to show 'opening state' per entire day and/or per selected calendar day (Abierto/Cerado)?
C) To ordinary fields of the known construction of 'Opening Hours' was added 3 different, but in essence same options.
- Holidays (official)
- Holidays (local)
- 'Special Days' (basically holidays, but added by client)
Common feature is that it is about ENTIRE SPECIFIC CALENDAR DAY/DATE
PROBLEM
How and where to determinate in permanent base (mean for every year) calendar days for Holidays? So, when client select 'New Year' for 'opening hours', it should to be for those 3 or 4 days of holidays. Obviously, it should to be previously done by Administrator. But how and where, plus how to connect it?
I know simple way. Let user to manually select calendar and name of Holiday (that's how it is done now), but can it be done in automatic way (to fill database with all holidays and than that by user selection it will be set automatically)? It is not so big deal here in 'Timetable', but if we add Events issue, it will be nice to get it in automatic way.
EXPIRATION TIME
Is it possible to get so, called 'expiration time'. Example - 'It is still open 35 minutes' (logically - current time count)?
==>Is there a similar example that we can see?
Yes, it is already build in my test site.
==>What is the link to your site?
Nigel knows.