how do dates work?