src/WooCommerce/Shop/InvoiceStatusOverviewForm.php
private function sanitizeEntryDateValue(array $entry, $key)
    {
        $date = '';
        if (!empty($entry[$key])) {
            $date = DateTime::createFromFormat(API::DateFormat_Iso, $entry[$key]);
            if ($date instanceof DateTime) {
                $date = $date->format(Api::DateFormat_Iso);
            } else {
                $date = '';
            }
        }
        return $date;
    }
private function sanitizeEntryDateValue(array $entry, $key)
    {
        $date = '';
        if (!empty($entry[$key])) {
            $date = DateTime::createFromFormat(API::DateFormat_Iso, $entry[$key]);
            if ($date instanceof DateTime) {
                $date = $date->format(Api::DateFormat_Iso);
            } else {
                $date = '';
            }
        }
        return $date;
    }
private function sanitizeEntryDateValue ( array $ entry , $ key ) { $ date = '' ; if ( ! empty ( $ entry [ $ key ] ) ) { $ date = DateTime :: createFromFormat ( API :: DateFormat_Iso , $ entry [ $ key ] ) ; if ( $ date instanceof DateTime ) { $ date = $ date -> format ( Api :: DateFormat_Iso ) ; } else { $ date = '' ; } } return $ date ; }
Returns a sanitized date value of an entry record.

@param array $entry
@param string $key

@return string
The date value (yyyy-mm-dd) of the value under this key or the empty
string, if the string is not in the valid date format (yyyy-mm-dd).
Returns a sanitized date value of an entry record .