function globallink_convert_date_to_timestamp in GlobalLink Connect for Drupal 7.5
Same name and namespace in other branches
- 7.7 globallink.inc \globallink_convert_date_to_timestamp()
- 7.6 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.
18 calls to globallink_convert_date_to_timestamp()
- 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.
- globallink_dashboard_node_form_validate in ./
globallink_send_translations.inc - Validates form actions for GlobalLink submissions.
- globallink_entity_dashboard_form_submit in globallink_entity/
globallink_entity_send.inc - Handles entity form submission.
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;
}