Date handling improvements