Useful extension functions for the DateTime class