It calcurates date.