Defensive date coding