Adjusted code to use date object in merchant class