Fixed duplicate code for DateTime Calendar in S3search

Fixed the issue of duplicate code in S3Search for DateTime Calendar as pointed out by Michael.