I don't like having to write and maintain date/time code if I don't have to: it's always really fiddly and yuck. I feel like this sort of thing should exist in a library somewhere - maybe dateutil?