Functions for handling dates.
