better error message in date.cc