You are here

function globallink_convert_date_to_timestamp in GlobalLink Connect for Drupal 7.6

Same name and namespace in other branches
  1. 7.7 globallink.inc \globallink_convert_date_to_timestamp()
  2. 7.5 globallink.inc \globallink_convert_date_to_timestamp()

Converts date to timestamp.

Parameters

string $date: Formatted date string in MM/DD/YY.

Return value

int The date in milliseconds.

20 calls to globallink_convert_date_to_timestamp()
globallink_beans_dashboard_form_submit in globallink_beans/globallink_beans_send.inc
Handles beans form submission.
globallink_beans_dashboard_form_validate in globallink_beans/globallink_beans_send.inc
Validates fieldable panels form input.
globallink_block_dashboard_form_submit in globallink_block/globallink_block_send.inc
Handles block form submission.
globallink_block_dashboard_form_validate in globallink_block/globallink_block_send.inc
Validates block form input.
globallink_dashboard_node_form_submit in ./globallink_send_translations.inc
Handles GlobalLink form submission.

... See full list

File

./globallink.inc, line 467
Miscellaneous GlobalLink functions for node translations (non-entity).

Code

function globallink_convert_date_to_timestamp($date) {
  list($month, $day, $year) = explode('/', $date);
  $seconds = mktime(0, 0, 0, $month, $day, $year);
  $due_date_in_milli_sec = $seconds * 1000;
  return $due_date_in_milli_sec;
}