To return the duration of an appointment
This function calculates the duration of an appointment for you, i.e. the time between the start and the end. The result is shown in hours and minutes.
If the duration is longer than 24 h, the days are shown additionally. There is no conversion from days to weeks, months, or years.
Result: 4 Days 9:00 (with holiday1: 05/24/2021 09:00 - 05/28/2021 18:00 (US))
duration(appointment(date(2021, 3, 27), date(2021, 3, 29)))
Result: 2 Days