You are here

function userpoints_date_to_timestamp in User Points 7

Same name and namespace in other branches
  1. 5.3 userpoints.module \userpoints_date_to_timestamp()
  2. 6 userpoints.module \userpoints_date_to_timestamp()
  3. 7.2 userpoints.module \userpoints_date_to_timestamp()

Modifies FAPI date setting to timestamp.

Return value

UNIX timestamp.

3 calls to userpoints_date_to_timestamp()
UserpointsAPITestCase::testDefaultExpireDate in tests/userpoints_api.test
Changes the default expiration date in the administrative settings and then checks to ensure that it is saved/returned correctly.
userpoints_admin_settings in ./userpoints.admin.inc
Menu callback for settings form.
userpoints_get_default_expiry_date in ./userpoints.module
Determines the correct default expiration date.

File

./userpoints.module, line 1542

Code

function userpoints_date_to_timestamp($date) {

  //This takes the FAPI date form array and returns a timestamp
  if ($date) {
    return mktime(0, 0, 0, $date['month'], $date['day'], $date['year']);
  }
}