function _resource_conflict_overlaps_from_date in Resource Conflict 6.2
Same name and namespace in other branches
- 5.2 resource_conflict.module \_resource_conflict_overlaps_from_date()
- 7.2 resource_conflict.module \_resource_conflict_overlaps_from_date()
Determine if any nodes conflict between the specified dates using Date API.
Parameters
$date_start: The start date of the date to check
$date_end: The end date of the date to check.
Return value
An array of node ID's
1 call to _resource_conflict_overlaps_from_date()
- resource_conflict_nodeapi in ./
resource_conflict.module - Implementation of hook_nodeapi
File
- ./
resource_conflict.module, line 333
Code
function _resource_conflict_overlaps_from_date($date_start, $date_end) {
// Make the default type to DATE_ISO.
$type = DATE_ISO;
// If date_start is not in DATE_ISO set the type to DATE_DATETIME.
if (!date_is_valid($date_start, DATE_ISO)) {
$type = DATE_DATETIME;
}
$start = date_make_date($date_start, 'GMT', $type);
$end = date_make_date($date_end, 'GMT', $type);
return _resource_conflict_get_overlaps($start, $end);
}