The businessEndsHour property (number) sets the end of business (in hours).
18
dp.businessEndsHour = 17;