Cleaned up the DateUtils code a bit