You are here

function swiftmailer_is_date_header in Swift Mailer 7

Checks whether a header is a date header.

Parameters

string $key: The header key.

string $value: The header value.

Return value

boolean TRUE if the provided header is a date header, and otherwise FALSE.

See also

http://swift_mailer.org/docs/header-date

1 call to swiftmailer_is_date_header()
swiftmailer_get_headertype in includes/helpers/conversion.inc
Determines the header type based on the a header key and value.

File

includes/helpers/conversion.inc, line 160
This file contains conversion functions.

Code

function swiftmailer_is_date_header($key, $value) {
  if (preg_match('/' . SWIFTMAILER_DATE_PATTERN . '/', $value)) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}