I have two arbitrary dates. I was wondering if somebody can suggest the rules to create a text message which tells in a very effective way what the two dates are.
Let's assume that my solution is just to simply display the two dates:
[23/06/09 10:00:00am - 23/06/09 12:00:00am]
a more effective way would be to spot that the two dates share the same yyyy-mm-dd and therefore instead produce the following:
[23/06/09 10:00:00am - 12:00:00am]
Another example could be:
[23/06/09 00:00:00am - 23/06/09 12:59:59pm]
which could become
[23/06/09 All Day]