function globallink_convert_date_to_timestamp in GlobalLink Connect for Drupal 7.7
Same name and namespace in other branches
- 7.5 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.
4 calls to globallink_convert_date_to_timestamp()
- globallink_create_submission_form_submit in ./
globallink_send_translations.inc - Handles GlobalLink form submission.
- globallink_create_submission_form_validate in ./
globallink_send_translations.inc - Validates form actions for GlobalLink submissions.
- globallink_view_log in ./
globallink_settings.inc - Wraps globallink_convert_date_to_timestamp.
- globallink_view_log_submit in ./
globallink_settings.inc - Exports log.
File
- ./
globallink.inc, line 424 - 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;
}