The formatDate method returns the supplied date as a string formatted using the specified formatting options. The first parameter is the date to be formatted; the second is the formatting to be applied. The 'varDestLocale' parameter specifies the Locale to use in determining the sequence in which the date elements are to be supplied; if none is specified, then the sequence is month-day-year. The date can be formatted using the following codes: