move several function to static members of DateTime
other small cleanup