It sets either when to depart from the origin or when to arrive at the destination. The routing
engine then optimises the route for that time window, considering traffic patterns for that time of day.
Remarks
Traffic conditions vary significantly by:
Time of day (rush hour vs off-peak)
Day of week (weekday vs weekend)
Special events or holidays
Specifying a departure or arrival time enables the router to:
Use appropriate traffic data for that time
Plan around rush hour or quiet periods
Calculate accurate arrival/departure times
Account for time-dependent road restrictions
Example
// Depart at specific time (morning commute) constdepartParams: DepartArriveParams = { option:'departAt', date:newDate('2025-10-20T08:00:00+02:00') };
// Arrive by specific time (catch a flight) constarriveParams: DepartArriveParams = { option:'arriveBy', date:newDate('2025-10-20T14:00:00+02:00') };
// Plan route avoiding rush hour constoffPeakDepart: DepartArriveParams = { option:'departAt', date:newDate('2025-10-20T10:30:00+02:00') // After morning rush };
If you pass a past date, or one that is impossible to achieve (such as an imminent arrival
date for a very long route), the route defaults to departing immediately.
The date is an instant, sent in UTC. For a wall-clock time at the origin, build the Date
with the origin's UTC offset.
The departure or arrival time for route planning.
It sets either when to depart from the origin or when to arrive at the destination. The routing engine then optimises the route for that time window, considering traffic patterns for that time of day.
Remarks
Traffic conditions vary significantly by:
Specifying a departure or arrival time enables the router to:
Example