Skip to content

Commit

Permalink
Merge pull request #17 from metno/v2.0.0
Browse files Browse the repository at this point in the history
V2.0.0
  • Loading branch information
ferrighi authored Oct 19, 2020
2 parents 0b69dd4 + eeec363 commit beadc00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metsis/metsis_qsearch/metsis_qsearch.utils.inc
Original file line number Diff line number Diff line change
Expand Up @@ -464,16 +464,16 @@ function adc_get_chosen_dates($form_state) {
$q = "";
if (!empty($form_state['values']['finished_after']) && empty($form_state['values']['finished_before'])) {
$finished_after = $form_state['values']['finished_after'];
$q = "mmd_temporal_extent_start_date:[" . msb_get_iso8601_date_time_zone($finished_after) . " TO *]";
$q = "mmd_temporal_extent_end_date:[" . msb_get_iso8601_date_time_zone($finished_after) . " TO *]";
}
if (empty($form_state['values']['finished_after']) && !empty($form_state['values']['finished_before'])) {
$finished_before = $form_state['values']['finished_before'];
$q = "mmd_temporal_extent_end_date:[* TO " . msb_get_iso8601_date_time_zone($finished_before) . "]";
$q = "mmd_temporal_extent_start_date:[* TO " . msb_get_iso8601_date_time_zone($finished_before) . "]";
}
if (!empty($form_state['values']['finished_after']) && !empty($form_state['values']['finished_before'])) {
$finished_after = $form_state['values']['finished_after'];
$finished_before = $form_state['values']['finished_before'];
$q = "mmd_temporal_extent_start_date:[" . msb_get_iso8601_date_time_zone($finished_after) . " TO *]" . " AND " . "mmd_temporal_extent_end_date:[* TO " . msb_get_iso8601_date_time_zone($finished_before) . "]";
$q = "mmd_temporal_extent_end_date:[" . msb_get_iso8601_date_time_zone($finished_after) . " TO *]" . " AND " . "mmd_temporal_extent_start_date:[* TO " . msb_get_iso8601_date_time_zone($finished_before) . "]";
}
return $q;
}
Expand Down

0 comments on commit beadc00

Please sign in to comment.