+
+my $estimateddeliverydatefrom_dt =
+ $estimateddeliverydatefrom
+ ? dt_from_string($estimateddeliverydatefrom)
+ : undef;
+
+# Get the "date to" param. If it is not defined and $delay is not defined too, it is the today's date.
+my $estimateddeliverydateto_dt = $estimateddeliverydateto
+ ? dt_from_string($estimateddeliverydateto)
+ : ( not defined $delay and not defined $estimateddeliverydatefrom)
+ ? dt_from_string()
+ : undef;
+
+# Format the output of "date from" and "date to"
+if ($estimateddeliverydatefrom_dt) {
+ $estimateddeliverydatefrom = output_pref({dt => $estimateddeliverydatefrom_dt, dateonly => 1});
+}
+if ($estimateddeliverydateto_dt) {
+ $estimateddeliverydateto = output_pref({dt => $estimateddeliverydateto_dt, dateonly => 1});
+}
+