Best practices for coding date sensitive websites
- by Duopixel
I'm creating a website for an event that is coming up. It has some functionality related to the event (such as "send me a reminder"), other stuff that takes place during the event, and finally some stuff that comes after the event.
I need to start working on code that takes place during the event and after the event, plus some fixes for the current site (which is already live). What is the best way to approach this problem?
Some solutions that occur to me are creating branches for each state and merging stuff as needed. Other one is hiding and showing functionality based on the date, i.e if (currentDate < eventDay) { reminder.show();}. Ideas?