I'm working on a report that displays information about our company's sales locations. One of the bits of information is the 'last visit date' of the location. If the location has never been visited, I have to display (in the current language) 'Never' in red. There are several values like this one, this is just the example I'm using.
Currently my location model returns NULL (direct from the database) if the location hasn't been visited.
So my question is, do I use the
- View to check for the NULL value, and then display 'Never' in red.
- Controller to check for the NULL value, change it to 'Never' and then the View would detect 'Never' and display that in red
- Should the Model call some isValid() method with the 'last visit date' which could check all manner of business rules(false on NULL, older then 6 months, etc) then return the date or 'Never' along with a flag to tell the view to display the value in red or black.
With #3, I think that is the most flexible. But is this simple case too soon to add that advanced functionality?
Any ideas are very appreciated!
Note: Our company's framework is some in-house PHP framework written many years ago.