fix issue with date format strings with literal endings