Elsevier content systems may need to identify dates with symmetric YYYYMMDD representations for indexing and validation. Given a valid Gregorian date in YYYY-MM-DD format, return the closest different date whose eight-digit YYYYMMDD representation is a palindrome.
Search by calendar-day distance. If two palindromic dates are equally close, return the earlier date.
Implement closest_palindromic_date(date_string), where date_string is a valid date from year 0001 through 9999. Return the closest different valid date as a string in YYYY-MM-DD format. The palindrome check must ignore the hyphens and use exactly four year digits, two month digits, and two day digits.
def closest_palindromic_date(date_string):