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?
Best practices for coding date sensitive websites
web development
If the three versions of your website are quite different, it would probably be easier to indeed have them ready as three different packages. The major disadvantage of that method is that you will have to promptly replace a version with the next at a specific moment, which could prove more or less difficult to do.Another arguably better solution is to make the website aware of its transformation and able to do so automatically. If you choose so, I would most certainly not cripple the code with if statements, but rather have a unique point of entry that would dispatch to the appropriate version depending on the date and time. The different versions could still easily use a common codebase, but would be completely independent from each other.Frameworks exist in most web-able languages that should provide everything you need to implement such a central dispatcher.Example: For Java, frameworks such as Spring MVC make it quite easy to do.