Reworked datehandler