dayjs.duration().hours(); dayjs.duration().asHours(); As with the other getters for durations, dayjs.duration().hours() gets the hours (0 - 23). dayjs.duration().asHours() gets the length of the duration in hours.