X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=includes%2Fformsearch.php;h=66c57c94b8412c8c0bbe6d654acaff78b6a5ad8b;hb=22f1dc6402dbc9a9c5d2ed2f17ef54044d35ec2a;hp=951bef1e546da3e6f311a6a8c32638fcdb818ea0;hpb=33eb6f2ab954597a257e9eb8f793a9bc52dd9524;p=Project_webapp.git diff --git a/includes/formsearch.php b/includes/formsearch.php index 951bef1..66c57c9 100644 --- a/includes/formsearch.php +++ b/includes/formsearch.php @@ -1,10 +1,10 @@ "; $input_failure = true; } +if (empty($form_arrival_date)) { + // Limit to a 6 months interval from the departure date. + $oArrivalDate = $oDepartureDate; + $oArrivalDate->add(new DateInterval("P6M")); + $form_arrival_date = $oArrivalDate->format('Y-m-d\TH:i'); +} + ?> -