Some rather complicated code for displaying dates in a way that saves space. This is entirely optional.