Automatic detection of the next date.