To do this, we need to create a user defined functions with parameters that match the logic.
Before this I wondered whether there is not a more efficient and simply approach. If there were two cells with dates in them (and a list of destination cities), the combinations of URLs could be created by using DAY, MONTH and YEAR functions on the date cells and references to the city cells. This way, simply updating the date cells will update the URLs. Is this a viable solution?