You are here

function _classified_get_timestamp_from_date in Classified Ads 7.3

Same name and namespace in other branches
  1. 6.3 classified.module \_classified_get_timestamp_from_date()

Convert a UNIX timestamp from the format used by the date widget.

Parameters

mixed $date: A NULL value will return The Epoch. Otherwise, pass an array.

Return value

int The UNIX timestamp for 00:00:00 on that date.

See also

_classified_get_date_from_timestamp()

4 calls to _classified_get_timestamp_from_date()
classified_form in ./classified.module
Implements hook_form().
classified_form_submit in ./classified.module
Submit handler for node form: normalize node form values.
classified_validate in ./classified.module
Implements hook_validate().
_classified_presave in ./classified.module
Convert node to a database-compatible format.

File

./classified.module, line 300
A pure D7 classified ads module inspired by the ed_classified module.

Code

function _classified_get_timestamp_from_date($date) {
  $ret = is_array($date) ? mktime(0, 0, 0, $date['month'], $date['day'], $date['year']) : 0;
  return $ret;
}