You are here

function date_text2unix in Date 5

2 calls to date_text2unix()
date_text_make_dbdate in ./date.inc
Construct a value to save to the database from text input
date_text_validate in ./date.inc
Validation for text input

File

./date.inc, line 1466
Date/time API functions

Code

function date_text2unix($text, $format) {
  if ($iso = date_text2iso($text, $format)) {
    if ($unix = date_iso2unix($iso)) {
      return $unix;
    }
  }
  return 'ERROR';
}